Sign in to follow this  
Followers 0
EliTe_ThuT

Help me with MsgBox

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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.

 

Share this post


Link to post
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

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