Guest Meflak Posted June 13, 2005 Share Posted June 13, 2005 Ok I have been working fo rhours on some script that will allow me to automate some tasks but I have one problem I want a message box to appear as I run the program to say Press enter to run the program.. Or have push yes to start the program. and if they dont/hit no the program ends.. I just am having a magor brain fart its so stupid right now... Link to comment Share on other sites More sharing options...
blindwig Posted June 13, 2005 Share Posted June 13, 2005 Ok I have been working fo rhours on some script that will allow me to automate some tasks but I have one problem I want a message box to appear as I run the program to say Press enter to run the program.. Or have push yes to start the program. and if they dont/hit no the program ends..I just am having a magor brain fart its so stupid right now...<{POST_SNAPBACK}>try the MsgBox function. It can have Yes and No buttons and will return a code depending on which one was clicked. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Guest Meflak Posted June 13, 2005 Share Posted June 13, 2005 try the MsgBox function. It can have Yes and No buttons and will return a code depending on which one was clicked.<{POST_SNAPBACK}>I know that much I have one to exit the script but how do I pause the script wait.. it the msg box returns a no just skip the prog and exit and just make sure the msg box is out of the main loop.. bah I am so tired right now thanks though Link to comment Share on other sites More sharing options...
datkewlguy Posted June 13, 2005 Share Posted June 13, 2005 (edited) Msgboxes automatically pause the script. Just say If MsgBox(4, "", "") = 6 Then (user pressed yes) Else (they pressed something else) endif isnt that all u need? Edited June 13, 2005 by datkewlguy Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 13, 2005 Share Posted June 13, 2005 MsgBox() should be what you need, but I suggest looking for a "no" (7) response from it, so as not to get a compilation error should you forget an EndIf at the end of the script if $msgboxret = "7" Then Exit is easier than if $msgboxret = "6" Then ;all ;your ;code Else Exit Endif Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) 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