Thompson Posted February 4, 2007 Posted February 4, 2007 Hi I want to make a yes/no msgbox like this: MsgBox(4100, "Test", "TEST") if i push yes he continues and if i push no also How do i make when i push yes he will run And if i push no he will Exit Thx
Somerset Posted February 4, 2007 Posted February 4, 2007 $begin=MsgBox(0x4, "Test", "Ready to begin?") if $begin = 7 then exit MsgBox(4096, "Test", "You pressed yes to get to this next message box", 10)
BALA Posted February 4, 2007 Posted February 4, 2007 (edited) 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 February 4, 2007 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
xcal Posted February 4, 2007 Posted February 4, 2007 (edited) $confirm = MsgBox(4, "Confirmation", "Yes or No?") If $confirm = 6 Then ; Checks for 'Yes' ; Put what you want to happen if they click Yes EndIf If $confirm = 7 Then ; Checks for 'No' Exit ; Closes script EndIf Edited February 4, 2007 by xcal How To Ask Questions The Smart Way
BALA Posted February 4, 2007 Posted February 4, 2007 (edited) 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 February 4, 2007 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
xcal Posted February 4, 2007 Posted February 4, 2007 (edited) Not sure how you'd produce an error out of a Yes/No message box when you're not using a timeout. Edited February 4, 2007 by xcal How To Ask Questions The Smart Way
BALA Posted February 4, 2007 Posted February 4, 2007 (edited) 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 timeoutIn that case, using an Else is easier than having to type out the whole If statement again. Edited February 4, 2007 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
Tentaal Posted June 3, 2007 Posted June 3, 2007 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now