Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: X-Ray Vision & Send Keys Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Deano
Groupie
Groupie
Avatar

Joined: February 19 2003
Location: United States
Online Status: Offline
Posts: 75
Posted: December 08 2008 at 08:25 | IP Logged Quote Deano

I want to start X-Ray Vision when My motion sensors detect movement and have X-Ray Vision send me an e-mail if it detects motion then shutdown.

So far all I have accomplished is launching X-Ray Vision using ph_run.

I think that the other functions will be done with Send Keys but have no idea how to code it.

I'd also like to start X-Ray Vision from the PH web server and view current images.
Back to Top View Deano's Profile Search for other posts by Deano
 
Deano
Groupie
Groupie
Avatar

Joined: February 19 2003
Location: United States
Online Status: Offline
Posts: 75
Posted: December 18 2008 at 10:46 | IP Logged Quote Deano

Come on PH people - Sombody knows how to do this. I cant believe I've stumped 61 of you so far
Back to Top View Deano's Profile Search for other posts by Deano
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 18 2008 at 13:37 | IP Logged Quote TonyNo

Can X-Ray Vision launch an executable when motion is detected?

If so, you can use the PowerHome Socket Server Command Line Controller to initiate something on the PH side. You would need to setup the socket server if you have not done so already.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
Deano
Groupie
Groupie
Avatar

Joined: February 19 2003
Location: United States
Online Status: Offline
Posts: 75
Posted: December 19 2008 at 17:07 | IP Logged Quote Deano

Tony,

Thanks for the response. Yes XRay Vision reportedly can detect motion and due stuff including send emails but I am trying to avoid running XRay all the time because of my limited resources. I have a house full of motion sensors that I will use to detect motion and is is quiet simple to launch XRay from PH with ph_run. Then It can take pics and send emails and then I want it to quit. It's the quit part I don't know how to do.

I need "ph_quit" or "ph_exit" or the equivalent.
Back to Top View Deano's Profile Search for other posts by Deano
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: December 19 2008 at 18:10 | IP Logged Quote grif091

Have you looked at ph_locateprocess and ph_killprocess.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
Deano
Groupie
Groupie
Avatar

Joined: February 19 2003
Location: United States
Online Status: Offline
Posts: 75
Posted: December 20 2008 at 08:19 | IP Logged Quote Deano

Lee,

I tried both of these but they do not verify in formula builder, and there is no help on them.

I'm running 1.03.4.12 on Win 98
Back to Top View Deano's Profile Search for other posts by Deano
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: December 20 2008 at 08:57 | IP Logged Quote grif091

Must be PH2 functions if they are not listed under Help. How about ph_findwindow and ph_closewindow. Would depend on the program opening a window and I don't know if these are PH2 only.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 20 2008 at 09:57 | IP Logged Quote TonyNo

There is a Windows util called pskill.exe that I still use that can kill running applications. It's part of PsTools. I use it in a Launch App macro line.

Launch App "pskill.exe webcam2000.exe"
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
Deano
Groupie
Groupie
Avatar

Joined: February 19 2003
Location: United States
Online Status: Offline
Posts: 75
Posted: December 20 2008 at 11:09 | IP Logged Quote Deano

Lee,

These functions do show up in 1.03.4.12 and I successfully closed the powerhome help window but I don't know if that is the same as quiting an application.

Also I couldn't get it to find the handle of the XRay Vision Window.


Tony,

Thanks Tony but I'm afraid this wont work on WIN 98.

Is Launch App the Macro equivalent of the function ph_run?

PsTools

PsKill is part of a growing kit of Sysinternals command-line tools that aid in the adminstration of local and remote systems named PsTools.


Runs on:

    * Client: Windows XP and higher.
    * Server: Windows Server 2003 and higher.

Regards,

Dean
Back to Top View Deano's Profile Search for other posts by Deano
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: December 20 2008 at 12:27 | IP Logged Quote grif091

Being an application it can do whatever it wants but most applications terminate when the window it opened is closed with the equivalent of clicking on the X button. If the application does not end at that point it would need some special way of being told to terminate after the window it opened was gone. Not very likely.

I assume you were searching for the window title as opposed to the class name. Does the title appear to have leading blanks based on where it is displayed in the window title line. Sounds like the title search argument did not match exactly, particularly when the functions found and closed the PH Help window.

I think there is a tool that can be run which displays the active window classes in Win98. I’ll see if I can find it. That goes back pretty far and I may be remembering something that was available under NT and not Win98.

EDIT: I did close out a Microsoft Word session with
ph_closewindow(ph_findwindow("Document1 - Microsoft Word",1))
formula. Just wanted to confirm that it would close out a window not under the PH tree. Also, this was PH2 running on XP so little confirmation about Win98.


Edited by grif091 - December 20 2008 at 12:54


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 20 2008 at 16:13 | IP Logged Quote TonyNo

Quote:
Thanks Tony but I'm afraid this wont work on WIN 98.

Ah. Didn't notice that. I'm sure you have your reasons.

Quote:
Is Launch App the Macro equivalent of the function ph_run?

Yup.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 20 2008 at 19:39 | IP Logged Quote BeachBum

Lee, there is also Window Spy under Maintenance, don’t know if it will help in this case.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: December 20 2008 at 20:05 | IP Logged Quote grif091

Pete, THANKS! that is exactly what is needed if the function is available under PH1 on Win98.

Dean, you can use the PH function Pete identified to find the window Class as well as the window Title text. Of course this may not be in PH1 or may not be available on Win98.

I'm still looking for an independent means of displaying the same information on Win98. I'm beginning to think it was a function under the development tool we used but I have not given up. If the function Pete identified is on PH1 and Win98 post back so I can stop searching. Thanks


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum