trashy Posted April 11, 2014 Share Posted April 11, 2014 (edited) I have 5 checkboxes in total. If $T5Checkbox3 is checked how to continue with the rest of the If statements. If it's unchecked I have another set to run. Edit: script is 5 tabs, 600 lines and growing. this is part of Func _Tab_5 Case $T5Button3 If GUICtrlRead($T5Input1) = "" Then MsgBox(0, "Empty.....", "No Drive Selected!") Return EndIf If GUICtrlRead($T5Checkbox3) = $Gui_Checked Then ;>>>>>>>>>>>>>>>If $T5Checkbox3 is checked then continue with following If statements If unchecked I have a different set of If statments to run>>>>>>>>>>>>>>>>>>>>>>>>> If GUICtrlRead($T5Checkbox1) = $GUI_CHECKED And GUICtrlRead($T5Checkbox2) = $GUI_CHECKED Then RunWait(@ComSpec & ' /k "' & @ScriptDir & '\Dism.exe /Capture-Image /ImageFile:"' & GUICtrlRead($T5Input2) & '" /CaptureDir:' & GUICtrlRead($T5Input1) & ' /Name:"' & GUICtrlRead($T5Input4) & ' /description:' & GUICtrlRead($T5Input5) & ' /Compress:' & GUICtrlRead($T5ComboBox1) & ' /CheckIntegrity /Verify', "") ElseIf GUICtrlRead($T5Checkbox1) = $GUI_CHECKED Then RunWait(@ComSpec & ' /k "' & @ScriptDir & '\Dism.exe /Capture-Image /ImageFile:"' & GUICtrlRead($T5Input2) & '" /CaptureDir:' & GUICtrlRead($T5Input1) & ' /Name:"' & GUICtrlRead($T5Input4) & ' /description:' & GUICtrlRead($T5Input5) & ' /Compress:' & GUICtrlRead($T5ComboBox1) & ' /CheckIntegrity', "") ElseIf GUICtrlRead($T5Checkbox2) = $GUI_CHECKED Then RunWait(@ComSpec & ' /k "' & @ScriptDir & '\Dism.exe /Capture-Image /ImageFile:"' & GUICtrlRead($T5Input2) & '" /CaptureDir:' & GUICtrlRead($T5Input1) & ' /Name:"' & GUICtrlRead($T5Input4) & ' /description:' & GUICtrlRead($T5Input5) & ' /Compress:' & GUICtrlRead($T5ComboBox1) & ' /Verify', "") Else RunWait(@ComSpec & ' /k "' & @ScriptDir & '\Dism.exe /Capture-Image /ImageFile:"' & GUICtrlRead($T5Input2) & '" /CaptureDir:' & GUICtrlRead($T5Input1) & '" /Name:' & GUICtrlRead($T5Input4) & ' /description:' & GUICtrlRead($T5Input5) & ' /Compress:' & GUICtrlRead($T5ComboBox1), "") EndIf Case $T5Button4 Edited April 11, 2014 by trashy Link to comment Share on other sites More sharing options...
Solution trashy Posted April 11, 2014 Author Solution Share Posted April 11, 2014 Another DUHHHH moment. Just add GUICtrlRead($T5Checkbox3) = $Gui_Checked And, to the beginning of each If statement. Link to comment Share on other sites More sharing options...
jdelaney Posted April 11, 2014 Share Posted April 11, 2014 Your sample is syntactically incorrect. And there is no need to add that additional Boolean condition to the inner If statements, since you would only be in there if checked...no point to check twice. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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