Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Function Keys 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: November 13 2002 at 08:34 | IP Logged Quote RWCS

Is it possible to execute a macro triggered by a keyboard function key press?  If so how would one go about this. . .

 

Bob



__________________
RWCS LLC
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: November 13 2002 at 09:58 | IP Logged Quote dhoward

Bob,

Absolutely!!!  You can have up to 48 hot key macros which will appear in your menu under Macros.  To set this up, open the PowerHome Explorer and go to the Macro Maintenance.  You'll see a column labeled "Menu Shortcut".  In the dropdown you can select what hotkey will trigger this macro.  The first 12 macros are triggered with the hotkey combination Ctrl-F1 through Ctrl-F12.  Once you've configured the hotkey, either Reinitialize or restart PowerHome and the hotkey will be active.

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: November 13 2002 at 13:23 | IP Logged Quote RWCS

Thanks for your response. . . Is there some way (in Windows) to assign a Function Key to PH (is that the Windows Scripting Thing?)  The Function Key Thing only seems to work when PH is active.

 

Can other Windows programs trigger PH Macros?



__________________
RWCS LLC
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: November 13 2002 at 16:40 | IP Logged Quote dhoward

Bob,

Within just the standard Windows Operating System, I know of no way to assign a hotkey to a particular application.  Ive seen this kind of thing done with 3rd party applications such as the special keyboards where you can assign an application to a "special" key such as to bring up an MP3 player or Internet Explorer.  Once PowerHome is active, then the function hotkeys will work but I guess the trick you're looking for at the moment is to bring PowerHome active.

The WSH or Windows Script Host is just a way to get more programming flexibility out of PowerHome.  Instead of writing macros (or in addition to), you can create Windows scripts (in either vbscript or jscript) to perform PowerHome actions.

Yes, other Windows programs can trigger PH macros.  This is accomplished through either Windows messaging or the Socket server.  If you want the very easiest way to do this, then you can have a Windows application send a message to PowerHome and create a trigger for this message.  This trigger could then in turn launch a macro.  An example of this would be to execute the Windows API function SendMessage.  If you were using VB, you would first need to make a couple of external function declarations:

Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Declare Function SendMessageA Lib "user32" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

You would then execute this function with this line:

SendMessageA(FindWindowA(0," PowerHome  "), 1024, somedata, somemoredata)

Im not a VB programmer so the above may not be "exactly" right but is close enough to get the idea.

You would then create a trigger in PowerHome with a Trigger Type of "WM_USER" and a Trigger ID of "Trigger 1".  This trigger could check the somedata and somemoredata fields and execute the appropriate macros or sendkeys.

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