Sign in to follow this  
Followers 0
sumit

How to Exit the script if cancel button of Input Box is pressed

6 posts in this topic

Please tell me How to Exit the script if cancel button of Input Box is pressed ?

Share this post


Link to post
Share on other sites



Please tell me How to Exit the script if cancel button of Input Box is pressed ?

Maybe...

$answer = InputBox("Question", "Where were you born?", "Planet Earth")
If $answer = "" Then Exit
MsgBox(0x0, "answer", $answer)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Maybe...

$answer = InputBox("Question", "Where were you born?", "Planet Earth")
If $answer = "" Then Exit
MsgBox(0x0, "answer", $answer)

8)

Thanks a lot.

Share this post


Link to post
Share on other sites

Thanks a lot.

Exit. Who would have thunk it? Takes me back to the GW-BASIC and earlier interpreters. I tried to find this one for a while, and checked under _ApplicationExit, _ProcessExit, Quit, Terminate, Stop, Halt, Alto, Anschlag! and all other kinds of keywords. Just when Microsoft got away from using Exit (VB6), AutoIt started using it. :whistle:

-- ii

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Not good enough. 
What if I ask a question and I need a true answer and not empty value?

Then I would not be able to exit on value = ""

 

Check out this correct answer!!!

 

 

Edited by The_Key_Maker

Share this post


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
Sign in to follow this  
Followers 0