ph_sendkeysmq PowerHome formula function
Description
Simulates keystrokes directly to a handle by posting WM_KEYDOWN messages to the handles message queue.
Syntax
ph_sendkeysmq ( n, s )
Argument Description
n The handle you wish keystrokes sent to.
s A string representing the send keys commands to generate.
Return value
Integer. Returns a 0.
Usage
This function uses the same send keys commands as the ph_sendkeys function. However, this function can simulate keystrokes to applications that are minimized or do not currently have focus. Note that using this method of generating keystrokes is not quite the same as ph_sendkeys. For example: To send keystrokes to a Notepad window, you would typically use ph_switchto to bring the Notepad window to the foreground and then use ph_sendkeys. To send these same keystrokes using ph_sendkeysmq, you must first identify the handle of the "Edit" box within the notepad window (typically using ph_findwindow to retrieve the handle of the Notepad window followed by ph_findwindowex to retrieve the handle of the "Edit" window).