| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri Jan 06, 2006 5:11 am Post subject: Stopping popups mid script |
|
|
I'm running macros on company software and from time to time system window popups show up which I have set timer close. Problem is if I am in the middle of a string on the current thread the string goes out of wack when ahk closes the popup mid string.
Would it be possible to pause the current thread, close the popup with the timer, and continue with the thread even if it is mid string? |
|
| Back to top |
|
 |
Rabiator
Joined: 17 Apr 2005 Posts: 265 Location: Sauerland
|
Posted: Fri Jan 06, 2006 10:11 am Post subject: |
|
|
| Quote: | | Problem is if I am in the middle of a string ... | Do you mean string operations or the execution of a script line? |
|
| Back to top |
|
 |
Decarlo110
Joined: 15 Dec 2004 Posts: 303 Location: United States
|
Posted: Fri Jan 06, 2006 4:42 pm Post subject: |
|
|
In your popup-close timer, perhaps use ControlSend or WinClose specifying a parameter, instead of something like Send !{F4}, or use ControlClick, instead of using MouseClick.
EDIT: Same for the main macro. The object is to specify the window (and control) instead of just sending to the active window. The reason why the macro does not behave as intended when the popup appears, is that it is most likely sending commands to the popup instead of your target window, and so after the popup disappears, the target window has missed receiving some commands.
As an alternative, perhaps you could specify Critical at the top of the popup-close timer, but after the timer is finished executing, there might still be the possibility of window-activation timing-issues. _________________ 1) The Open Source Definition http://www.opensource.org/docs/definition_plain.php
2) Intuitive. Logical. Versatile. Adaptable. <<AutoHotkey>> |
|
| Back to top |
|
 |
|