Jump to content
Sign in to follow this  
sumit

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

Recommended Posts

sumit

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
Valuater

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
sumit

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
iimull

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
The_Key_Maker

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  

×