Author |
|
RWCS Senior Member
Joined: October 28 2002 Location: United States
Online Status: Offline Posts: 102
|
Posted: July 31 2006 at 12:59 | IP Logged
|
|
|
My entertainment system uses PH which is called from a keyboard utility that runs phcommand.exe, which in turn ecacutes different macros. Part of this process is to maximize (and bring to the PC's foreground) PH at the correct page for the function selected. For instance F9 call PHcommand.exe which envokes a macro named "DVD", or F6 calls PHcommand.exe which envokes a macro named "TV", and so on. Each of these "functions" has a page of device (or function) specific commands. For instance the numeric keys in the TV screen are different from the numeric keys in VCR screen. So when for instance, "TV" is run PH needs to move to the screen at F4 (or the fourth screen), or DVD & VCR need to change PH to the F2 screen (second screen) and so on.
The problem is that these macros act differently under different conditions, and I'm looking for inspiration on how to structure this thing to avoid this problem.
Because PH gets confused if someone bumps the mouse (especially right click) or hits certain keys, PH is minimized when the system is OFF. When coming from a minimized state all the macros select the correct screen on PH. All is well until you try to switch between functions. When switching functions the same routine that worked from the "OFF" state fails to switch screens. All other configuration commands (IR & X-10) are exacuted correctly both before and after the PH screen command part of the macro. The sequence I'm using is:
Formula / Immediate / ph_sendmsg(ph_handle(),274,61488,0)
Switch to App / Window Name / " PowerHome "
Send Keys / Immediate / '{F4}'
What am I doing wrong???
Bob
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: August 02 2006 at 22:02 | IP Logged
|
|
|
Bob,
Im not sure if I fully understand what you're doing but I think I have an idea and can perhaps offer some suggestions.
As long as PowerHome is the active application, you can immediately jump to the Control Center with the keystroke combination Alt-F1. You may want to send these keys before sending the F4 or similar. You can also set the current tab of the Control Center by using the ph_setcctab function.
I tried using the ph_sendkeysmq function to send keystrokes directly to the Control Center with PowerHome staying minimized but could not get that to work so it wouldnt be an option.
A couple of other functions that may be useful are ph_windowstate(2) to maximize the PowerHome window and ph_setforegroundwindow(ph_handle()) to set PowerHome as the active window.
So if I have this right, I would possibly try:
ph_windowstate(2) + ph_setforegroundwindow(ph_handle()) + ph_sendkeys("{alt+F1}") + ph_setcctab(4)
Let me know if any of this helps or not.
Dave.
|
Back to Top |
|
|
RWCS Senior Member
Joined: October 28 2002 Location: United States
Online Status: Offline Posts: 102
|
Posted: August 03 2006 at 10:32 | IP Logged
|
|
|
Thanks for your response and information. I have made the problem go away with the old statements by changing "Immediate" to "Post". I have never understood what those lines did other than they worked. I'm going to try your suggestion as soon as I get some time to do so (wheel isn't squeaking at this time). I do though have a question:
In the past I have made these statements on seperate lines, can you really chain them togther with "+" signs?
Bob
|
Back to Top |
|
|