Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Is an app already running? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rmackay
Groupie
Groupie


Joined: December 15 2003
Location: United States
Online Status: Offline
Posts: 28
Posted: January 28 2004 at 23:11 | IP Logged Quote rmackay

I use the following forumla to launch my PVR app to record from an XCAM2 camera when a motion detector triggers...

if(ph_getx10stat("E",4)<>2,ph_run("C:\Program Files\WinTV\WinTV2K.EXE -nss -ntod -c6 -cg -startr -qvcd -mute"),0)

Is there a way or a powerhome function that I can use to determine if the app is already running? Basically, if the app is already running, it is because someone is already watching something or recording something, so I do not want the app to be launched again ( in effect overriding the current app with a record from Channel 6 command ).

Thank you,

Robert

Back to Top View rmackay's Profile Search for other posts by rmackay
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 29 2004 at 11:03 | IP Logged Quote dhoward

Robert,

Absolutely! Use the ph_findwindow function.  If the application is not already open, this function will return a 0.

You can also use the ph_switchto function to make the application the current application if it is running.  You can then use the ph_sendkeys function to actually send keystrokes to the PVR app to control it.

Hope this helps,

Dave.

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

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