Jump to content

Help me with MsgBox


Recommended Posts

Hi, I would like to know how to get the value of the pressed button ( with the MsgBox) . I looked in the doc. file but they only say that ok return 1, cancel 2, abort 3... But how can we get those value?

For example in a if statement...

if "buttun 1" Then

Shutdown(0)

[...]

Edit: Solved by my own...

Edited by EliTe_ThuT
Link to comment
Share on other sites

here's an example:

#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes, No, and Cancel, Icon=Warning
If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(51,"Test","Test of the message box")
Select
   Case $iMsgBoxAnswer = 6;Yes

   Case $iMsgBoxAnswer = 7;No

   Case $iMsgBoxAnswer = 2;Cancel

EndSelect
#EndRegion --- CodeWizard generated code End ---

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

here's an example:

#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes, No, and Cancel, Icon=Warning
If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(51,"Test","Test of the message box")
Select
   Case $iMsgBoxAnswer = 6;Yes

   Case $iMsgBoxAnswer = 7;No

   Case $iMsgBoxAnswer = 2;Cancel

EndSelect
#EndRegion --- CodeWizard generated code End ---
I hadn't figured it out that way... this way is much better... Thanks a lot
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...