Jump to content

Pause a script and then continuing


Recommended Posts

Guest Meflak

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 post
Share on other sites

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.
Link to post
Share on other sites
Guest Meflak

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 post
Share on other sites

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...