PcExpert Posted December 6, 2007 Share Posted December 6, 2007 Hi all,How can I let the script do something while an msgbox is displayed?I tried this:while MsgBox(64, "test", "test")Run("notepad.exe")WinWaitActive("Naamloos - Kladblok")Send("yreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefddddddddddddddddddfdgwrgwgwrgwrgwrgwrg")WEndBut that didnt work. Any Ideas? Thanks! Link to comment Share on other sites More sharing options...
DW1 Posted December 6, 2007 Share Posted December 6, 2007 Easy answer is you cannot. You can do what you are describing with a GUI that you create. The msgbox is just a small gui... so if you make your own, you could have your own code running while its up AutoIt3 Online Help Link to comment Share on other sites More sharing options...
weaponx Posted December 6, 2007 Share Posted December 6, 2007 Same thing requested like a week ago....http://www.autoitscript.com/forum/index.ph...oIt3ExecuteLine Link to comment Share on other sites More sharing options...
lordicast Posted December 6, 2007 Share Posted December 6, 2007 (edited) Hi all,How can I let the script do something while an msgbox is displayed?I tried this:But that didnt work. Any Ideas? Thanks!Put it in a func ;exampleinstead of a action being done and sendingCODEMsgbox(64,'test','test');;Just send;Mes()and add funcCODEfunc Mes()MsgBox(64, "test", "test")Run("notepad.exe")WinWaitActive("Naamloos - Kladblok")Send("yreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefddddddddddddddddddfdgwrgwgwrgwrgwrgwrg")endfuncPS i suck at codeboxes Edited December 6, 2007 by lordicast [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
DW1 Posted December 6, 2007 Share Posted December 6, 2007 @lordicast, sorry but that does not help the problem, now the msgbox just hangs in the function... He is looking for a way to execute code while the msgbox is up I believe, and to do that you need to make your own GUI AutoIt3 Online Help Link to comment Share on other sites More sharing options...
lordicast Posted December 6, 2007 Share Posted December 6, 2007 (edited) @lordicast, sorry but that does not help the problem, now the msgbox just hangs in the function... Works just fine for me. Func Mes() MsgBox(64,'test','test') run('notepad.exe') WinWaitActive('Untitled - Notepad') Send("yreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeefddddddddddddddddddfdgwrgwgwrgwrgwrgwrg") EndFunc But I think if a Msgbox is up you cant get to anything else on the gui till you closed it right, so its gonna close at one point then why not send somthing after the box is closed. makes sense Edited December 6, 2007 by lordicast [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
DW1 Posted December 6, 2007 Share Posted December 6, 2007 How can I let the script do something while an msgbox is displayed?Your function just does the same thing his script does... it waits until AFTER the msgbox is gone to continue...No it does not do what he wants.He wants a message box to be up, and to perform lines of code WHILE the msgbox is up... your code does NOT do that. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
weaponx Posted December 6, 2007 Share Posted December 6, 2007 This was the solution from my previous post: Run(@AutoItExe & ' /AutoIt3ExecuteLine "If MsgBox(262209,''Ready to Re-Start'',''The Installation is completed and ready to re-start. '' & @CRLF & @CRLF & ''Press OK to restart now.'' & @CRLF & @CRLF) = 1 Then Shutdown(6)"') 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