Jump to content
Sign in to follow this  
Syntaxe

MsgBox 4, if and else

Recommended Posts

Syntaxe

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
Nahuel

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
Foy

$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
Syntaxe

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
Nahuel

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.