Ideas for new features & functions
Moderators: JRL, Dorian (MJT support)
-
JRL
- Automation Wizard
- Posts: 3529
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Tue Jan 28, 2014 4:02 pm
I find myself often trying to efficiently determine when a window that is already open has regained focus. Generally this uses GetActiveWindow> in a loop testing for "Window Name" is active. This is complicated when window names vary because they have dates or times or work order numbers or etc in the window name.
It would simplify many of my scripts if there was a WaitWindowFocused> function that used the same window name wildcard and timing facilities as other window functions.
Rather than
Code: Select all
Label>WaitForUpdatingWO
GetActiveWindow>WinTitle,WinX,WinY
Separate>WinTitle,Updating WO:,WaitUWOres
If>WaitUWOres_Count>1
Else
Wait>0.5
Goto>WaitForUpdatingWO
EndIf
-
JRL
- Automation Wizard
- Posts: 3529
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Wed Jan 29, 2014 1:45 pm
Thank you for the greatest support of the most useful software ever invented.
-
jpuziano
- Automation Wizard
- Posts: 1085
- Joined: Sat Oct 30, 2004 12:00 am
Post
by jpuziano » Fri Jan 31, 2014 11:20 pm
Great idea for a new function!
The WaitWindowOpen function uses certain system variables - Help File Out-Take wrote:The system variable WW_TIMEOUT can be used to set the number of seconds after which this command should timeout. If set to zero (the default) the timeout will not occur and the command will continue indefinitely. If WW_TIMEOUT is used, WW_RESULT will indicate whether or not the command ended successfully. If it timed out WW_RESULT will be set to FALSE. If the window it was waiting for appeared within the timeout setting, the WW_RESULT value will be set to TRUE.
Of course it would be great to have a similar system variables available for use with this new
WaitWindowFocused> function... maybe called:
WWF_TIMEOUT
WWF_RESULT
Again, this makes a lot of sense as a function. Thanks JRL for proposing this and thanks Marcus for listening...
