Jump to content

Run a function while waiting?


Recommended Posts

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
Link to comment
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.

Link to comment
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

Link to comment
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')
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...