Sign in to follow this  
Followers 0
Menalaus

Run a function while waiting?

7 posts in this topic

#1 ·  Posted (edited)

just wondering if i have:

MsgBox(48, "title", "Waiting for you to select the right window!") And WinWaitActive("Window im waiting for")

Is this possible at all?

so the only way to cancel the script was to say hit cancel on the message box to stop waiting?

sorry if I'm being vague if you need more just ask.

I am new and have solved other problems by going over the help file multiple times just stuck on this one.

Thanks

-Menalaus

Edited by Menalaus

Share this post


Link to post
Share on other sites



did you try that? There´s many errors on it. But luckly for you MsgBox() Stops the scripts until the MessageBox is closed.

Share this post


Link to post
Share on other sites

Both MSgBox() and WinWaitActive() are Blocking functions, meaning they do not return until the function is complete.

So the short answer is no.

Perhaps you are referring to multithreading, which Autoit3 is not.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

did you try that? There´s many errors on it. But luckly for you MsgBox() Stops the scripts until the MessageBox is closed.

Was just a pure example ;) not true script, but yes i tried that and also the
ContinueLoop
command

JohnOne thanks i didn't think i was able to but no harm asking :)

owell thanks for the replies anyway guys much help!

-Menalaus

Share this post


Link to post
Share on other sites

Was just a pure example ;) not true script, but yes i tried that and also the

ContinueLoop
command

JohnOne thanks i didn't think i was able to but no harm asking :)

owell thanks for the replies anyway guys much help!

-Menalaus

Would this not help?

While Not WinActive("Window im waiting for")
    MsgBox(48, "Not Yet", "Waiting for you to select the right window!", 2)
WEnd
MsgBox(0, 'W o W', 'You clicked on the correct Window')

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Would this not help?

While Not WinActive("Window im waiting for")
    MsgBox(48, "Not Yet", "Waiting for you to select the right window!", 2)
WEnd
MsgBox(0, 'W o W', 'You clicked on the correct Window')

ah i see what you did there :) works a treat pretty much ;) thankyou very much!

-Menalaus

Edited by Menalaus

Share this post


Link to post
Share on other sites

ah i see what you did there :) works a treat pretty much ;) thankyou very much!

-Menalaus

You're welcome!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0