CharlieNoyes Posted March 27, 2014 Share Posted March 27, 2014 (edited) Hello all, I have a question as to how to pause a function until someone hits "ok" on a messagebox (id:1). Here is the sample code that I put together but it does not run (throws errors related to either switch of a "bad function). Any advice or other implementation techniques? Func MsgWait() $input1 = MsgBox(0, "randometext", "loremipsum") Switch $input1 Case 1 Send("+{F10}") Send("i") Send("{Enter}") Send("{Enter}") Send("{Enter}") Send("{Enter}") EndSwitch EndFunc Edited March 27, 2014 by CharlieNoyes Link to comment Share on other sites More sharing options...
Solution CharlieNoyes Posted March 27, 2014 Author Solution Share Posted March 27, 2014 Oh my lord. http://lmgtfy.com/?q=stop+function+until+msgbox+is+clicked+autoit Help documentation pls save me. sennabot 1 Link to comment Share on other sites More sharing options...
somdcomputerguy Posted March 27, 2014 Share Posted March 27, 2014 (edited) MsgBox, when it's called, will pause the script until the MsgBox function is ended. Here is a slightly modified version of the script you posted above.Operationally, except for the ouput, it is pretty much the same. And it works just fine for me. MsgWait() Func MsgWait() $input1 = MsgBox(0, "randometext", "loremipsum") Switch $input1 Case 1 ConsoleWrite("OK!" & @CRLF) EndSwitch EndFunc Edited March 27, 2014 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now