DigDeep Posted April 30, 2015 Share Posted April 30, 2015 Hi,Not sure why it is not working here.Everything else works good, except if I want to perform any of the actions (Say Step 1) then it should give me a msgbox first to proceed or not.The code works for Step 1 but I am not getting that msgbox prior to that.Also if I select NO then I just want the msgBox to close. Not the complete code.Could you please help here. expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 388, 241, 750, 360) $Step1 = GUICtrlCreateLabel("Step 1", 32, 40, 42, 20) $Step2 = GUICtrlCreateLabel("Step 3", 216, 40, 42, 20) $Step3 = GUICtrlCreateLabel("Step 2", 120, 40, 42, 20) $Step4 = GUICtrlCreateLabel("Step 4", 312, 40, 42, 20) $Input_Text = GUICtrlCreateInput("", 48, 104, 289, 24) $OK = GUICtrlCreateButton("OK", 152, 176, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() $aInfo = GUIGetCursorInfo($Form1) If $aInfo[2] Then If $aInfo[4] = $Input_Text Then GUICtrlSetData($Input_Text, "") EndIf Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Select Case GUICtrlRead($Input_Text) = '1' $verify = MsgBox(68, "", "Do you want to proceed with Step 1?") Select Case $verify = '6' Exit Case $verify = '7' ; Cancel Exit EndSelect Msgbox(0,"","step1") Case GUICtrlRead($Input_Text) = '2' Msgbox(0,"","step2") Case GUICtrlRead($Input_Text) = '3' Msgbox(0,"","step3") Case GUICtrlRead($Input_Text) = '4' Msgbox(0,"","step4") EndSelect EndSwitch WEnd Link to comment Share on other sites More sharing options...
ajag Posted April 30, 2015 Share Posted April 30, 2015 $verify = MsgBox(68, "", "Do you want to proceed with Step 1?") Select Case $verify = 6 ; YES, proceed with step 1 Msgbox(0,"","step1") Case $verify = 7 ; NO thanks EndSelect Or simplierIf MsgBox(68, "", "Do you want to proceed with Step 1?") = 6 Then Msgbox(0,"","step1") EndIfAjag Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
DigDeep Posted April 30, 2015 Author Share Posted April 30, 2015 thanks, by the time I refreshed this page I already figured out. Thank you again. Link to comment Share on other sites More sharing options...
DigDeep Posted April 30, 2015 Author Share Posted April 30, 2015 I used something like this....$verify = MsgBox(68, "", "Do you want to proceed with Step 1?") Select Case $verify = '6' ; Cancel Exit Case $verify = '7' Continueloop EndSelect Msgbox(0,"","step1") Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted April 30, 2015 Share Posted April 30, 2015 When you only want the one thing you can even one line it. If MsgBox(4, "", "My Text Question") = 6 Then MsgBox(0, "", "You Clicked Yes") Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 30, 2015 Moderators Share Posted April 30, 2015 Or...$firstQuestion = MsgBox(4, "", "My Test Question") $answer = MsgBox(0, "", ($firstQuestion = 6) ? "You clicked Yes" : "You clicked No") SkysLastChance 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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