Jump to content

InputBox question


Tukata
 Share

Recommended Posts

I have this script and want to close the inputbox if "Cancel" is pressed.

How do I do that ?

$answer = InputBox("Test", "Enter a word", "Planet Earth", "", 200, 100)
MsgBox(4096, "Test", $answer)

While 1
    Sleep(100)
WEnd

Thank you

If you want you can put that in a loop and exit when user cancels.

While 1

$answer = InputBox("Test", "Enter a word", "Planet Earth", "", 200, 100)
If @error then exit
MsgBox(4096, "Test", $answer)

WEnd

:)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...