The following code won't work.
Code: Select all
SetFocus>Macro Scheduler
Moderators: JRL, Dorian (MJT support)
Code: Select all
SetFocus>Macro Scheduler
I have a genuine need to open multiple help files such as RegexBuddy and EditPad for cross-reference. Except Macro Scheduler, ALL other help files can be setfocused with any glitch.Marcus Tettmar wrote:Got to ask - what earthly reason do you have for making a macro focus the Macro Scheduler help window. Or is this just a made up example?
Code: Select all
ExecuteFile>msched.chm
Let>WF_TYPE=2
WaitWindowOpen>Macro Scheduler
MessageModal>test
SetFocus>Macro Scheduler
Code: Select all
ExecuteFile>msched.chm
Let>msched_help_handle=0
Label>wait_help_window
Let>WIN_USEHANDLE=1
GetWindowList>all_windows
Separate>all_windows,CRLF,handle_list
Let>k=0
Repeat>k
Let>k=k+1
Let>this_handle=handle_list_%k%
GetWindowNames>this_handle,theTitle,theClass
If>theTitle=Macro Scheduler
If>theClass=HH Parent
//this is the help window
Let>msched_help_handle=this_handle
ENdif
Endif
Until>k=handle_list_count
If>msched_help_handle=0
Goto>wait_help_window
Endif
//we now have the handle of the msched help window
MessageModal>test
Wait>2
SetFocus>msched_help_handle
Hi Marcus,Marcus Tettmar wrote:Or this more technical method:...
Code: Select all
ExecuteFile>C:\Program Files (x86)\Macro Scheduler 14\MSCHED.chm
Let>msched_help_handle=0
Label>wait_help_window
Let>WIN_USEHANDLE=1
GetWindowList>All_Windows
Separate>All_Windows,CRLF,Handle_List
Let>k=0
Repeat>k
Let>k=k+1
Let>TEMP_handle=Handle_List_%k%
GetWindowNames>TEMP_handle,theTitle,theClass
If>{(%theTitle%="Macro Scheduler") AND (%theClass%="HH Parent")}
// Found the desired help window
Let>msched_help_handle=TEMP_handle
Endif
Until>k=Handle_List_count
If>msched_help_handle=0
WaitProcessExists>hh.exe
Goto>wait_help_window
Endif