AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stopping popups mid script

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Jan 06, 2006 4:11 am    Post subject: Stopping popups mid script Reply with quote

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: 289
Location: Sauerland

PostPosted: Fri Jan 06, 2006 9:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Decarlo110



Joined: 15 Dec 2004
Posts: 303
Location: United States

PostPosted: Fri Jan 06, 2006 3:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group