Jump to content

Msgbox


 Share

Recommended Posts

I just wanted to add, if you want to specifically tell if a person clicked yes or no, you would do something like this:

$confirm = MsgBox(4, "Confirmation", "Yes or No?")
    If $confirm = 6 Then ; Checks for 'Yes'
        MsgBox(0, "Yes", "You clicked 'Yes'")
    EndIf
    If $confirm = 7 Then ; Checks for 'No'
        MsgBox(0, "No", "You clicked 'No'")
    EndIfoÝ÷ Ù8^Ú,z۩­ʷö·¬k(§«­¢+ØÀÌØí½¹¥É´ô5Í   ½à аÅÕ½Ðí
½¹¥ÉµÑ¥½¸ÅÕ½Ðì°ÅÕ½Ðíe̽È9¼üÅÕ½Ðì¤(%%ÀÌØí½¹¥É´ôØQ¡¸ì
¡­Ì½ÈÌäíeÌÌäì($$ìAÕÐÝ¡Ðå½ÔݹÐѼ¡ÁÁ¸¥Ñ¡ä±¥¬eÌ(%¹%(%ÀÌØí½¹¥É´ôÜQ¡¸ì
¡­Ì½ÈÌäí9¼Ìäì($%á¥Ðì
±½ÍÌÍÉ¥ÁÐ(%¹%
Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

Probably better as...

$confirm = MsgBox(4, "Confirmation", "Yes or No?")
If $confirm = 6 Then ; Checks for 'Yes'
     ; Put what you want to happen if they click Yes
Else
     Exit ; Closes script
EndIf
But wouldn't that also go off if there's an error then?

Failure: Returns -1
Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

Not sure how you'd produce an error out of a Yes/No message box when you're not using a timeout.

Oh sorry didn't notice the timeout

In that case, using an Else is easier than having to type out the whole If statement again.

Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

  • 3 months later...

Maybe a stupid question but...

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Radio1
            $Choice = MsgBox(4, "CTPPatchsCollection " & $version, "You are going to update Call to Power I.")
                if $Choice=6 then; Yes
                    run(@TempDir & "\cctp1_2_f.exe")
                    GUICtrlSetState($Radio1,$GUI_UNCHECKED) 
                EndIf
                if $choice=7 then; No
                    GUICtrlSetState($Radio1,$GUI_UNCHECKED) 
                EndIF
...

When I select $Radio1 I get the YES/NO Box. All is fine. If I check NO, I go back to the main GUI. If I check Yes, and then I cancel the installation process, I go back to the YES/NO box and I cannot go back to the main GUI. Why???

Thanks!

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...