Sign in to follow this  
Followers 0
Syntaxe

MsgBox 4, if and else

6 posts in this topic

How can I get this to work?

If they click yes on the MsgBox 4 they end up with "Continuing".

If they click no on the MsgBox 4, they end up with "Exit".

Thanks for helping! :)

MsgBox(4, "Sure?", "Are you sure you want to continue?")
If
    {
    MsgBox(64, "Title", "Continuing")
    }
Else
    {
    MsgBox(64, "Title", "Exit")
    }

Share this post


Link to post
Share on other sites

Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(4,"Sure?","Are you sure you want to continue?")
Select
   Case $iMsgBoxAnswer = 6 ;Yes
    MsgBox(64, "Title", "Continuing")
   Case $iMsgBoxAnswer = 7 ;No
    MsgBox(64, "Title", "Exit")
EndSelect

:)

AutoIt MsgBox wizard is great. Use it.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

$response = MsgBox(4, "Sure?", "Are you sure you want to continue?")
If $response = 6 then
    MsgBox(64, "Title", "Continuing")
Else
    MsgBox(64, "Title", "Exit")
EndIf

Edited by Foy

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks for that fast reply!

Now I got it to work ^^

Edit; Btw, where is the MsgBox wizard?

Edited by Syntaxe

Share this post


Link to post
Share on other sites

...\Program Files\AutoIt3\Examples\GUI\Advanced\msgboxwizard.au3

Share this post


Link to post
Share on other sites

Thanks! ^^


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