bloopie Posted October 15, 2016 Share Posted October 15, 2016 Hello again, I'm writing a pretty simple GUI and script to help out some other colleagues. ...The GUI has currently 4 Radio Buttons, a combobox, an input box (which I will probably remove), and a Button. I would like to add a msgbox if no Radio Buttons have been checked when the Button is pressed...this sounds very simple but I'm not sure how I should be doing it! I've tried a few things already... If GuiCtrlRead(box1)=$GUI_CHECKED And GuiCtrlRead(box2)=$GUI_CHECKED And (same for box 3 and 4, they all = Checked) Then msgbox(0,0, "blah, blah, blah") I've tried different wording of the above (i.e. "And Not $GUI_UNCHECKED"), as well as using variables to cut down on the code....and one other method as well...but I just can't get the msgbox to come up only when the button is pressed AND NO radio's are checked. Can someone please point me in the right direction, and/or suggest some better methods?? It would be much appreciated! Here is an obfuscated version of the GUI I have: expandcollapse popup#include <IE.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> HotKeySet("{f1}", "Terminate") Global $Vendor = 'http://172.16.128.1/vendors.html' Global $Combo Global $idComboRead = GUICtrlRead($Combo) #Region ### START Koda GUI section ### Form=C:\Users\****\Desktop\KODA.kxf $Form1 = GUICreate("Press F1 to Exit!",@DesktopWidth, (@DesktopHeight-55)) Global $Input1 = GUICtrlCreateInput("", 40, 48, 161, 21) GUICtrlSetCursor (-1, 5) $Label1 = GUICtrlCreateLabel("Please Enter Part Number Below", 40, 24, 158, 17) Global $GOButton = GUICtrlCreateButton("GO", 280, 32, 97, 25) GUICtrlSetCursor (-1, 0) Global $GWC = GUICtrlCreateRadio("GWC", 480, 30, 57, 17) Global $ARC = GUICtrlCreateRadio("ARC", 480, 55, 73, 17) Global $WAWHAW = GUICtrlCreateRadio("Wood", 592, 30, 99, 17) $Combo = GUICtrlCreateCombo("default loc", 800, 32, 201, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($Combo,"location1|location2|location3|location4|location5", "default loc") Global $Primo = GUICtrlCreateRadio("Primo", 592, 55, 97, 17) Global $Group1 = GUICtrlCreateGroup("WAREHOUSE", 456, 5, 265, 75) GUICtrlSetFont(-1, 10, 900, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $oIE = _IECreateEmbedded() Global $Object = GUICtrlCreateObj($oIE,10,100,(@DesktopWidth-20),(@DesktopHeight-128)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #cs Global $wrhse1 = GUICtrlRead($GWC) ;used the wrhseX variables unsuccessfully Global $wrhse2 = GUICtrlRead($ARC) Global $wrhse3 = GUICtrlRead($WAWHAW) Global $wrhse4 = GUICtrlRead($Primo) #ce While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $WAWHAW Local $answer1 = MsgBox($MB_YESNO + $MB_ICONQUESTION + $MB_TASKMODAL, 'Wood', 'Clicking "YES" will log in with the *** account!' & @CRLF & @CRLF & 'Do you want to log in with the *** Account?', 15) If $answer1 = $IDYES Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 14) Else ContinueLoop EndIf Case $Primo Local $answer2 = MsgBox($MB_YESNO + $MB_ICONQUESTION + $MB_TASKMODAL, 'Primo', 'Clicking "YES" will log in with the *** account!' & @CRLF & @CRLF & 'Do you want to log in with the *** Account?', 15) If $answer2 = $IDYES Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 11) Else ContinueLoop EndIf Case $GOButton GO_Button() EndSwitch WEnd Func GO_Button() If GUICtrlRead($Combo) = "location1" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 5) ElseIf GUICtrlRead($Combo) = "Default loc" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 6) ElseIf GUICtrlRead($Combo) = "location2" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 7) ElseIf GUICtrlRead($Combo) = "location3" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 8) ElseIf GUICtrlRead($Combo) = "location4" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 9) ElseIf GUICtrlRead($Combo) = "location1" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 0) ElseIf GUICtrlRead($Combo) = "Default loc" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 1) ElseIf GUICtrlRead($Combo) = "location2" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 2) ElseIf GUICtrlRead($Combo) = "location3" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 3) ElseIf GUICtrlRead($Combo) = "location4" And GUICtrlRead($ARC) = $GUI_CHECKED Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Only existing accounts will load!!", 15) ElseIf GUICtrlRead($Combo) = "Monroe" And GUICtrlRead($ARC) = $GUI_CHECKED Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Only existing accounts will load!!", 15) ElseIf GUICtrlRead($Combo) = "Spring Valley" And GUICtrlRead($GWC) = $GUI_CHECKED Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Use *** account for GWC/locationX!!", 15) EndIf EndFunc Func Terminate() Exit EndFunc bloopie Malware Response Instructor @ BC Link to comment Share on other sites More sharing options...
AutoBert Posted October 15, 2016 Share Posted October 15, 2016 8 minutes ago, bloopie said: Here is an obfuscated version of the GUI I have When you need help, why posting obfuscated version? Link to comment Share on other sites More sharing options...
bloopie Posted October 15, 2016 Author Share Posted October 15, 2016 (edited) The only thing hidden are names of variables...nothing dependent on the function. I wouldn't have posted it if it wasn't the functions I was using. ...And disregard "Monroe" and "Spring Valley", those can be any "locationX". Edited October 15, 2016 by bloopie Malware Response Instructor @ BC Link to comment Share on other sites More sharing options...
orbs Posted October 15, 2016 Share Posted October 15, 2016 (edited) @bloopie, 1st easiest solution: pre-check one of the radio options as default. 2nd easiest solution: start with the button disabled. when you process $msg, if a message came from one of the radio options then it means it was checked, so enable the button. this can be done only once; a user cannot un-check all radio options. like this: expandcollapse popup#include <IE.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> HotKeySet("{f1}", "Terminate") Global $Vendor = 'http://172.16.128.1/vendors.html' Global $Combo Global $idComboRead = GUICtrlRead($Combo) #Region ### START Koda GUI section ### Form=C:\Users\****\Desktop\KODA.kxf $Form1 = GUICreate("Press F1 to Exit!", @DesktopWidth, (@DesktopHeight - 55)) Global $Input1 = GUICtrlCreateInput("", 40, 48, 161, 21) GUICtrlSetCursor(-1, 5) $Label1 = GUICtrlCreateLabel("Please Enter Part Number Below", 40, 24, 158, 17) Global $GOButton = GUICtrlCreateButton("GO", 280, 32, 97, 25) GUICtrlSetCursor(-1, 0) GUICtrlSetState(-1, $GUI_DISABLE) ; >>>>> ADDED Global $GWC = GUICtrlCreateRadio("GWC", 480, 30, 57, 17) Global $ARC = GUICtrlCreateRadio("ARC", 480, 55, 73, 17) Global $Primo = GUICtrlCreateRadio("Primo", 592, 55, 97, 17) Global $WAWHAW = GUICtrlCreateRadio("Wood", 592, 30, 99, 17) ; moved here from two lines below, to create all radio optinos in sequence $Combo = GUICtrlCreateCombo("default loc", 800, 32, 201, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) GUICtrlSetData($Combo, "location1|location2|location3|location4|location5", "default loc") Global $Group1 = GUICtrlCreateGroup("WAREHOUSE", 456, 5, 265, 75) GUICtrlSetFont(-1, 10, 900, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $oIE = _IECreateEmbedded() Global $Object = GUICtrlCreateObj($oIE, 10, 100, (@DesktopWidth - 20), (@DesktopHeight - 128)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #cs Global $wrhse1 = GUICtrlRead($GWC) ;used the wrhseX variables unsuccessfully Global $wrhse2 = GUICtrlRead($ARC) Global $wrhse3 = GUICtrlRead($WAWHAW) Global $wrhse4 = GUICtrlRead($Primo) #ce While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $WAWHAW GUICtrlSetState($GOButton, $GUI_ENABLE) ; >>>>> ADDED Local $answer1 = MsgBox($MB_YESNO + $MB_ICONQUESTION + $MB_TASKMODAL, 'Wood', 'Clicking "YES" will log in with the *** account!' & @CRLF & @CRLF & 'Do you want to log in with the *** Account?', 15) If $answer1 = $IDYES Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 14) Else ContinueLoop EndIf Case $Primo GUICtrlSetState($GOButton, $GUI_ENABLE) ; >>>>> ADDED Local $answer2 = MsgBox($MB_YESNO + $MB_ICONQUESTION + $MB_TASKMODAL, 'Primo', 'Clicking "YES" will log in with the *** account!' & @CRLF & @CRLF & 'Do you want to log in with the *** Account?', 15) If $answer2 = $IDYES Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 11) Else ContinueLoop EndIf Case $GWC, $ARC ; >>>>> ADDED GUICtrlSetState($GOButton, $GUI_ENABLE) ; >>>>> ADDED Case $GOButton GO_Button() EndSwitch WEnd Func GO_Button() If GUICtrlRead($Combo) = "location1" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 5) ElseIf GUICtrlRead($Combo) = "Default loc" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 6) ElseIf GUICtrlRead($Combo) = "location2" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 7) ElseIf GUICtrlRead($Combo) = "location3" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 8) ElseIf GUICtrlRead($Combo) = "location4" And GUICtrlRead($GWC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 9) ElseIf GUICtrlRead($Combo) = "location1" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 0) ElseIf GUICtrlRead($Combo) = "Default loc" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 1) ElseIf GUICtrlRead($Combo) = "location2" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 2) ElseIf GUICtrlRead($Combo) = "location3" And GUICtrlRead($ARC) = $GUI_CHECKED Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 3) ElseIf GUICtrlRead($Combo) = "location4" And GUICtrlRead($ARC) = $GUI_CHECKED Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Only existing accounts will load!!", 15) ElseIf GUICtrlRead($Combo) = "Monroe" And GUICtrlRead($ARC) = $GUI_CHECKED Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Only existing accounts will load!!", 15) ElseIf GUICtrlRead($Combo) = "Spring Valley" And GUICtrlRead($GWC) = $GUI_CHECKED Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Use *** account for GWC/locationX!!", 15) EndIf EndFunc ;==>GO_Button Func Terminate() Exit EndFunc ;==>Terminate look for the lines ending with a comment ; >>>>> ADDED also, this may prove an interesting reading (start from the end): Edited October 15, 2016 by orbs bloopie 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
bloopie Posted October 16, 2016 Author Share Posted October 16, 2016 Hello orbs, and thanks very much for your insight!!! Quote 1st easiest solution: pre-check one of the radio options as default. Yes, I was aware of this, and know it would be super easy to do...but I could foresee some people logging in to the wrong accounts that way, so I really don't want to have a default radio checked (sorry, I should have mentioned that in advance). However, disabling the "Go" button is certainly an option that could work...thanks for that! The link to the other topic is also full of good info I hadn't exactly read elsewhere, so thanks again very much! I was thinking of looping through the radio buttons as well, but haven't yet thought of the proper way to do it that would work for my purposes. What you have proposed in the other topic is a great idea, and that may work...if I loop through all radio buttons only once when "Go" is pressed, and then return a msgbox if none are checked...that sounds like it might work, but I'm not sure how...yet....but I'll work on that too next chance I have. ========== I'm going to see what I can do with all the good information you have provided for me. Thank you very much for your very helpful reply! bloopie Malware Response Instructor @ BC Link to comment Share on other sites More sharing options...
quickbeam Posted October 19, 2016 Share Posted October 19, 2016 Sounds like you need to do a little reading on combinational logic. From your description, I think you would want to AND together the GUI_UNCHECKED state of the buttons, not the GUI_CHECKED state. Basically, you want something like this: I re-ordered things a bit for less repeating of the same check, and then added an else-if at the bottom that I think is what you want. By the time that else-if is reached, you know two radio buttons aren't checked, so you only need to see that the other two are unchecked before popping up the msgbox. expandcollapse popupFunc GO_Button() If GUICtrlRead($GWC) = $GUI_CHECKED Then ; this part could be a switch clause also If GUICtrlRead($Combo) = "location1" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 5) ElseIf GUICtrlRead($Combo) = "Default loc" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 6) ElseIf GUICtrlRead($Combo) = "location2" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 7) ElseIf GUICtrlRead($Combo) = "location3" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 8) ElseIf GUICtrlRead($Combo) = "location4" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 9) ElseIf GUICtrlRead($Combo) = "Spring Valley" Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Use *** account for GWC/locationX!!", 15) EndIf ElseIf GUICtrlRead($ARC) = $GUI_CHECKED Then If GUICtrlRead($Combo) = "location1" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 0) ElseIf GUICtrlRead($Combo) = "Default loc" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 1) ElseIf GUICtrlRead($Combo) = "location2" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 2) ElseIf GUICtrlRead($Combo) = "location3" Then _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, 3) ElseIf GUICtrlRead($Combo) = "location4" Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Only existing accounts will load!!", 15) ElseIf GUICtrlRead($Combo) = "Monroe" Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & "Only existing accounts will load!!", 15) Endif ElseIf GUICtrlRead($Primo) = $GUI_UNCHECKED And GUICtrlRead($WAWHAW) = $GUI_UNCHECKED Then MsgBox ($MB_OK, "Error", "Please select a location") EndIf EndFunc Link to comment Share on other sites More sharing options...
quickbeam Posted October 19, 2016 Share Posted October 19, 2016 Also, NOT $GUI_UNCHECKED is the same thing as $GUI_CHECKED. I.e. Not False = True Link to comment Share on other sites More sharing options...
quickbeam Posted October 19, 2016 Share Posted October 19, 2016 (edited) But really, this is the way I would do it: expandcollapse popupFunc GO_Button() If GUICtrlRead($Primo) = $GUI_UNCHECKED And GUICtrlRead($GWC) = $GUI_UNCHECKED And GUICtrlRead($ARC) = $GUI_UNCHECKED And GUICtrlRead($Primo) = $GUI_UNCHECKED Then MsgBox ($MB_OK, "Error", "Please select a location") Else Local $IndexToClick = -1 Local $AccountMsg If GUICtrlRead($GWC) = $GUI_CHECKED Then If GUICtrlRead($Combo) = "location1" Then $IndexToClick = 5 ElseIf GUICtrlRead($Combo) = "Default loc" Then $IndexToClick = 6 ElseIf GUICtrlRead($Combo) = "location2" Then $IndexToClick = 7 ElseIf GUICtrlRead($Combo) = "location3" Then $IndexToClick = 8 ElseIf GUICtrlRead($Combo) = "location4" Then $IndexToClick = 9 ElseIf GUICtrlRead($Combo) = "Spring Valley" Then $AccountMsg = "Use *** account for GWC/locationX!!" EndIf ElseIf GUICtrlRead($ARC) = $GUI_CHECKED Then If GUICtrlRead($Combo) = "location1" Then $IndexToClick = 0 ElseIf GUICtrlRead($Combo) = "Default loc" Then $IndexToClick = 1 ElseIf GUICtrlRead($Combo) = "location2" Then $IndexToClick = 2 ElseIf GUICtrlRead($Combo) = "location3" Then $IndexToClick = 3 ElseIf GUICtrlRead($Combo) = "location4" Then $AccountMsg = "Only existing accounts will load!!" ElseIf GUICtrlRead($Combo) = "Monroe" Then $AccountMsg = "Only existing accounts will load!!" Endif ElseIf GUICtrlRead($Primo) = $GUI_CHECKED Then ; handle $Primo location ElseIf GUICtrlRead($WAWHAW) = $GUI_CHECKED Then ; handle $WAWHAW location EndIf If $IndexToClick = -1 Then MsgBox($MB_ICONWARNING + $MB_TASKMODAL, 'ERROR!!', "Account does not exist!!" & @CRLF & @CRLF & $AccountMsg, 15) Else _IENavigate($oIE, "about:blank") _IENavigate($oIE, $Vendor) _IELinkClickByIndex($oIE, $IndexToClick) EndIf EndIf EndFunc Edited October 19, 2016 by quickbeam Removed empty Else clause Link to comment Share on other sites More sharing options...
spudw2k Posted October 19, 2016 Share Posted October 19, 2016 @quickbeam Small suggestion, read once, eval many: ;untested Func GO_Button() Local $iStatePrimo = GUICtrlRead($Primo), $iStateGWC = GUICtrlRead(@GWC), $iStateARC = GUICtrlRead($ARC) ;If GUICtrlRead($Primo) = $GUI_UNCHECKED And GUICtrlRead($GWC) = $GUI_UNCHECKED And GUICtrlRead($ARC) = $GUI_UNCHECKED And GUICtrlRead($Primo) = $GUI_UNCHECKED Then If $iStatePrimo = $GUI_UNCHECKED And $iStateGWC = $GUI_UNCHECKED And $iStateARC = $GUI_UNCHECKED Then MsgBox ($MB_OK, "Error", "Please select a location") Else Local $IndexToClick = -1 Local $AccountMsg Local $sValueCombo = GUICtrlRead($Combo) If $iStateGWC = $GUI_CHECKED Then If $sValueCombo = "location1" Then $IndexToClick = 5 ElseIf $sValueCombo = "Default loc" Then $IndexToClick = 6 ElseIf $sValueCombo = "location2" Then $IndexToClick = 7 ;...etc Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
quickbeam Posted October 19, 2016 Share Posted October 19, 2016 Good point. I was on that path (compared to the original), but you took it an additional step. Link to comment Share on other sites More sharing options...
bloopie Posted October 19, 2016 Author Share Posted October 19, 2016 (edited) @quickbeam Quote Sounds like you need to do a little reading on combinational logic. From your description, I think you would want to AND together the GUI_UNCHECKED state of the buttons, not the GUI_CHECKED state. Actually, no...I mentioned in my first post, I have tried both the $GUI_CHECKED and the $GUI_UNCHECKED states...neither worked. I'm quite sure I understand conditional logic just fine (I'm a malware removal instructor in which conditional logic is used more often than you'd think ), but I really do appreciate the additional way of going about the issue, thanks very much for that (spudw2k included)! My testing time is very limited currently, but I will work a bit with that and let you know how it goes. Thanks again. bloopie Edited October 19, 2016 by bloopie Malware Response Instructor @ BC Link to comment Share on other sites More sharing options...
kylomas Posted October 22, 2016 Share Posted October 22, 2016 On 10/19/2016 at 6:18 PM, bloopie said: I'm a malware removal instructor This is a job? kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
bloopie Posted October 22, 2016 Author Share Posted October 22, 2016 15 hours ago, kylomas said: This is a job? This is a hobby...but it may as well be a job considering the time committed. bloopie Malware Response Instructor @ BC 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