Code: Select all
^v::
Send, !s ;searches for words in the app
Sleep, 1000 ;waits for search to be done(always varies in relation to amount of words
send, !a ;copy all words to clipboard
Send, !{esc} ; switches tab from anagram to next tab (notepad)
Send %clipboard%
Return
As you can see the sleep time for search to be done varies, 1k result takes 5sec, 500words 2secs, 4k 6secs and many more which I have to keep resetting sleep timer everytime.
I once used window spy to check the app, what I noticed was that whenever I press the search button manually, every info in the spy will just stop updating and when search is completed, focus control and active windows position will and others will resume updating me about the anagram app. Can their be a way that after search is clicked, sleep timer will be based on frozen(search is going on) and Focused and windows position changes and new update (search is done, then the next alt key 'copy all' can then function).
Please I need a script sample that will be able to detect when search is done I.e automatically knows when search task results are out and copies it all without stressing myself to add sleep timers everytime because its really stressful.