Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Subtle Problem Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
RWCS
Senior Member
Senior Member
Avatar

Joined: October 28 2002
Location: United States
Online Status: Offline
Posts: 102
Posted: July 31 2006 at 12:59 | IP Logged Quote RWCS

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 View RWCS's Profile Search for other posts by RWCS Visit RWCS's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: August 02 2006 at 22:02 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
RWCS
Senior Member
Senior Member
Avatar

Joined: October 28 2002
Location: United States
Online Status: Offline
Posts: 102
Posted: August 03 2006 at 10:32 | IP Logged Quote RWCS

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 View RWCS's Profile Search for other posts by RWCS Visit RWCS'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