Zeronic Posted November 19, 2012 Share Posted November 19, 2012 (edited) $OFFICE10cb = GUICtrlCreateCheckbox("Office 2010", 512, 296, 129, 33) $office10 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --10, 472, 296, 32, 32) $OFFICE10dd = GUICtrlCreateCombo("", 656, 136, 65, 30, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData($OFFICE10dd, "STD|PRO", "STD") Case $OFFICE10cb If GUICtrlRead($OFFICE10cb) = $GUI_CHECKED Then $OFFICE10 = 1 If GUICtrlRead($OFFICE10cb) = $GUI_UNCHECKED Then $OFFICE10 = 0 Case $OFFICE10dd If GUICtrlRead($OFFICE10dd) = "STD" Then $OF10V = 2 If GUICtrlRead($OFFICE10dd) = "PRO" Then $OF10V = 3 If $OFFICE10 = 1 Then Msgbox (0, "Office 2010", "Office 2010 is " & $OF10V & " " & $OFFICE10dd) If $OF10V = 2 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Microsoft Office 2010 STD", "Microsoft Office 2010 STD") $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $OF10V = 3 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Microsoft Office 2010 Pro", "Microsoft Office 2010 Pro") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf I've having some problem with only 1 of the 6 Comboboxes I have created in my script, for some reason it is not calling the case and changing the value of the version id. Thanks, Z Edited November 19, 2012 by Zeronic Link to comment Share on other sites More sharing options...
BrewManNH Posted November 19, 2012 Share Posted November 19, 2012 There is a LOT of code missing from that example to get it to work at all, but analyzing what you've posted this might be closer to what you're trying to achieve. $OFFICE10cb = GUICtrlCreateCheckbox("Office 2010", 512, 296, 129, 33) $office10 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", - - 10, 472, 296, 32, 32) $OFFICE10dd = GUICtrlCreateCombo("", 656, 136, 65, 30, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) GUICtrlSetData($OFFICE10dd, "STD|PRO", "STD") Select Case $OFFICE10cb If GUICtrlRead($OFFICE10cb) = $GUI_CHECKED Then $office10 = 1 Else $office10 = 0 EndIf Case $OFFICE10dd If GUICtrlRead($OFFICE10dd) = "STD" Then $OF10V = 2 ElseIf GUICtrlRead($OFFICE10dd) = "PRO" Then $OF10V = 3 EndIf If $office10 = 1 Then MsgBox(0, "Office 2010", "Office 2010 is " & $OF10V & " " & $OFFICE10dd) If $OF10V = 2 Then $P = 0 GUICtrlSetData($Progress1, $P) MsgBox(0, "Microsoft Office 2010 STD", "Microsoft Office 2010 STD") $P += 100 GUICtrlSetData($Progress1, $P) EndIf If $OF10V = 3 Then $P = 0 GUICtrlSetData($Progress1, $P) MsgBox(0, "Microsoft Office 2010 Pro", "Microsoft Office 2010 Pro") $P += 100 GUICtrlSetData($Progress1, $P) EndIf EndIf EndSelect If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
Zeronic Posted November 19, 2012 Author Share Posted November 19, 2012 (edited) Yeah sorry about that, I only posted the code related to the problem I was having. I'm going to post the full thing. Thou when I change the combobox to either STD or PRO it returns a blank $OF10V and $OFFICE10dd comes back as 61 regardless of what I try to select. All the other work just fine otherwise. expandcollapse popup#include <Constants.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <GuiComboBox.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### $Server = "10.10.20.59" ;@ServerPath & "File Name" $SOPHOSsrv = "10.10.20.9SophosUpdateCIDsS000SAVSCFXP" $ProgramFiles = "C:Program Files" $ProgramFiles86 = "C:Program Files (x86)" $Software = "ISPublicSoftware" $ISSoftware = "ISSoftware" $MSISoftware = "SoftwareMSI" $Adobe9 = "ISPublicSoftwareAdobe9STD" $Adobe10 = "ISPublicSoftwareAdobe10STD" $AdminIT = GUICreate("AutoIT Menu", 731, 535, 192, 124) GUISetFont(14, 400, 0, "Arial") GUISetBkColor(0xFFFFFF) $AutoIT = GUICtrlCreateLabel("AdminIT", 80, 16, 644, 60, BitOR($SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetFont(-1, 30, 400, 0, "Arial") $Logo = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsbarringtonlogo72.ico", --4, 8, 8, 72, 72) $Progress1 = GUICtrlCreateProgress(0, 501, 730, 33) $Run = GUICtrlCreateButton("Run", 8, 456, 81, 41) $Close = GUICtrlCreateButton("Close", 640, 456, 81, 41) $FLASHcb = GUICtrlCreateCheckbox("Flash Player", 48, 96, 145, 33) $flash = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsflash32.ico", --5, 8, 96, 32, 32) $JAVAcb = GUICtrlCreateCheckbox("Java", 48, 136, 73, 33) $java = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsjava32.ico", --6, 8, 136, 32, 32) $FIREFOXcb = GUICtrlCreateCheckbox("Fire Fox", 48, 176, 97, 33) $firefox = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsfirefox32.ico", --7, 8, 176, 32, 32) $IE9cb = GUICtrlCreateCheckbox("Internet Explorer 9", 48, 216, 185, 33) $ie9 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsie9.ico", --8, 8, 216, 32, 32) $GCcb = GUICtrlCreateCheckbox("Google Chrome", 48, 256, 161, 33) $chrome = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconschrome.ico", --9, 8, 256, 32, 32) $DX9cb = GUICtrlCreateCheckbox("Directx 9", 48, 296, 113, 33) $directx = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --10, 8, 296, 32, 32) $CCCPcb = GUICtrlCreateCheckbox("CCCP", 48, 334, 89, 33) $cccp = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconscccp.ico", --8, 8, 336, 32, 32) $SDcb = GUICtrlCreateCheckbox("Smart Defrag", 48, 374, 161, 33) $smartdefrag = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssmartdefrag32.ico", --9, 8, 376, 32, 32) $SCcb = GUICtrlCreateCheckbox("Slim Cleaner", 48, 414, 137, 33) $slimclean = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsslimcleaner.ico", --10, 8, 416, 32, 32) $MOScb = GUICtrlCreateCheckbox("MOS", 296, 96, 73, 33) $mos = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --5, 256, 96, 32, 32) $MOVEcb = GUICtrlCreateCheckbox("MOVE", 296, 136, 89, 33) $move = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --6, 256, 136, 32, 32) $UDcb = GUICtrlCreateCheckbox("UD", 296, 176, 65, 33) $ud = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --7, 256, 176, 32, 32) $TFcb = GUICtrlCreateCheckbox("Time Force", 296, 216, 129, 33) $tf = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsTimeForce.ico", --8, 256, 216, 32, 32) $SPBcb = GUICtrlCreateCheckbox("Springbrook", 296, 256, 137, 33) $spb = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsspringbrookv7.ico", --9, 256, 256, 32, 32) $FHWEBcb = GUICtrlCreateCheckbox("Firehouse Web", 296, 296, 153, 33) $fhweb = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsfh_shield.ico", --10, 256, 296, 32, 32) $ITcb = GUICtrlCreateCheckbox("iTunes", 296, 336, 161, 33) $itunes = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsitunes.ico", --8, 256, 336, 32, 32) $LFcb = GUICtrlCreateCheckbox("Laserfiche", 296, 376, 113, 33) $lf = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsLF.ico", --9, 256, 376, 32, 32) $FOXITcb = GUICtrlCreateCheckbox("Foxit Reader", 296, 416, 137, 33) $foxit = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --10, 256, 416, 32, 32) $AB9cb = GUICtrlCreateCheckbox("Acrobat 09", 512, 96, 113, 33) $acorbat09 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsacrobat32.ico", --5, 472, 96, 32, 32) $AB09dd = GUICtrlCreateCombo("", 656, 96, 65, 30, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData($AB09dd, "STD|PRO","STD") $AB10cb = GUICtrlCreateCheckbox("Acrobat 10", 512, 136, 113, 33) $acrobat10 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsAcrobat10.ico", --6, 472, 136, 32, 32) $AB10dd = GUICtrlCreateCombo("", 656, 296, 65, 30, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData($AB10dd, "STD|PRO", "STD") $AB11cb = GUICtrlCreateCheckbox("Acrobat 11", 512, 176, 113, 33) $acrobat11 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --7, 472, 176, 32, 32) $AB11dd = GUICtrlCreateCombo("", 656, 176, 65, 30, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData($AB11dd, "STD|PRO", "STD") $ABUPcb = GUICtrlCreateCheckbox("Acrobat Update", 512, 216, 153, 33) $acrobatup = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --8, 472, 216, 32, 32) $ABUPdd = GUICtrlCreateCombo("", 672, 216, 49, 30, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData($ABUPdd, "09|10|11", "09") $OFFICE07cb = GUICtrlCreateCheckbox("Office 2007", 512, 256, 121, 33) $office07 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --9, 472, 256, 32, 32) $OFFICE07dd = GUICtrlCreateCombo("", 656, 256, 65, 30, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData($OFFICE07dd, "STD|PRO", "STD") $OFFICE10cb = GUICtrlCreateCheckbox("Office 2010", 512, 296, 129, 33) $office10 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --10, 472, 296, 32, 32) $OFFICE10dd = GUICtrlCreateCombo("", 656, 136, 65, 30, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL)) GUICtrlSetData($OFFICE10dd, "STD|PRO", "STD") $GISEcb = GUICtrlCreateCheckbox("GIS Explorer", 512, 336, 137, 33) $gise = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --8, 472, 336, 32, 32) $AD12cb = GUICtrlCreateCheckbox("AutoDesk 2012", 512, 376, 169, 33) $ad12 = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconssoftware.ico", --9, 472, 376, 32, 32) $SOPHOScb = GUICtrlCreateCheckbox("Sophos", 512, 416, 97, 33) $sophos = GUICtrlCreateIcon("10.10.20.59ISPublicScriptsIconsSophos.ico", --10, 472, 416, 32, 32) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $Progress1, $P Local $F, $J, $FF, $AB09, $AB10, $AB11, $SD, $SC, $IT, $IE9, $GC, $DX9, $CCCP, $MOS, $MOVE, $UD, $TF, $SPB, $FHWEB, $LF, $FOXIT, $ABUP, $OFFICE07, $OFFICE10, $GISE, $AD12, $SOPHOS Local $AB09V, $AB10V, $AB11V, $ABUPV Local $OF07V, $OF10V While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $FLASHcb If GUICtrlRead($FLASHcb) = $GUI_CHECKED Then $F = 1 If GUICtrlRead($FLASHcb) = $GUI_UNCHECKED Then $F = 0 Case $JAVAcb If GUICtrlRead($JAVAcb) = $GUI_CHECKED Then $J = 1 If GUICtrlRead($JAVAcb) = $GUI_UNCHECKED Then $J = 0 Case $FIREFOXcb If GUICtrlRead($FIREFOXcb) = $GUI_CHECKED Then $FF = 1 If GUICtrlRead($FIREFOXcb) = $GUI_UNCHECKED Then $FF = 0 Case $IE9cb If GUICtrlRead($IE9cb) = $GUI_CHECKED Then $IE9 = 1 If GUICtrlRead($IE9cb) = $GUI_UNCHECKED Then $IE9 = 0 Case $AB9cb If GUICtrlRead($AB9cb) = $GUI_CHECKED Then $AB09 = 1 If GUICtrlRead($AB9cb) = $GUI_UNCHECKED Then $AB09 = 0 Case $AB10cb If GUICtrlRead($AB10cb) = $GUI_CHECKED Then $AB10 = 1 If GUICtrlRead($AB10cb) = $GUI_UNCHECKED Then $AB10 = 0 Case $AB11cb If GUICtrlRead($AB11cb) = $GUI_CHECKED Then $AB11 = 1 If GUICtrlRead($AB11cb) = $GUI_UNCHECKED Then $AB11 = 0 Case $SDcb If GUICtrlRead($SDcb) = $GUI_CHECKED Then $SD = 1 If GUICtrlRead($SDcb) = $GUI_UNCHECKED Then $SD = 0 Case $SCcb If GUICtrlRead($SCcb) = $GUI_CHECKED Then $SC = 1 If GUICtrlRead($SCcb) = $GUI_UNCHECKED Then $SC = 0 Case $ITcb If GUICtrlRead($ITcb) = $GUI_CHECKED Then $IT = 1 If GUICtrlRead($ITcb) = $GUI_UNCHECKED Then $IT = 0 Case $GCcb If GUICtrlRead($GCcb) = $GUI_CHECKED Then $GC = 1 If GUICtrlRead($GCcb) = $GUI_UNCHECKED Then $GC = 0 Case $DX9cb If GUICtrlRead($DX9cb) = $GUI_CHECKED Then $DX9 = 1 If GUICtrlRead($DX9cb) = $GUI_UNCHECKED Then $DX9 = 0 Case $CCCPcb If GUICtrlRead($CCCPcb) = $GUI_CHECKED Then $CCCP = 1 If GUICtrlRead($CCCPcb) = $GUI_UNCHECKED Then $CCCP = 0 Case $MOScb If GUICtrlRead($MOScb) = $GUI_CHECKED Then $MOS = 1 If GUICtrlRead($MOScb) = $GUI_UNCHECKED Then $MOS = 0 Case $MOVEcb If GUICtrlRead($MOVEcb) = $GUI_CHECKED Then $MOVE = 1 If GUICtrlRead($MOVEcb) = $GUI_UNCHECKED Then $MOVE = 0 Case $UDcb If GUICtrlRead($UDcb) = $GUI_CHECKED Then $UD = 1 If GUICtrlRead($UDcb) = $GUI_UNCHECKED Then $UD = 0 Case $TFcb If GUICtrlRead($TFcb) = $GUI_CHECKED Then $TF = 1 If GUICtrlRead($TFcb) = $GUI_UNCHECKED Then $TF = 0 Case $SPBcb If GUICtrlRead($SPBcb) = $GUI_CHECKED Then $SPB = 1 If GUICtrlRead($SPBcb) = $GUI_UNCHECKED Then $SPB = 0 Case $FHWEBcb If GUICtrlRead($FHWEBcb) = $GUI_CHECKED Then $FHWEB = 1 If GUICtrlRead($FHWEBcb) = $GUI_UNCHECKED Then $FHWEB = 0 Case $LFcb If GUICtrlRead($LFcb) = $GUI_CHECKED Then $LF = 1 If GUICtrlRead($LFcb) = $GUI_UNCHECKED Then $LF = 0 Case $FOXITcb If GUICtrlRead($FOXITcb) = $GUI_CHECKED Then $FOXIT = 1 If GUICtrlRead($FOXITcb) = $GUI_UNCHECKED Then $FOXIT = 0 Case $ABUPcb If GUICtrlRead($ABUPcb) = $GUI_CHECKED Then $ABUP = 1 If GUICtrlRead($ABUPcb) = $GUI_UNCHECKED Then $ABUP = 0 Case $ABUPdd If GUICtrlRead($ABUPdd) = "09" Then $ABUPV = 2 If GUICtrlRead($ABUPdd) = "10" Then $ABUPV = 3 If GUICtrlRead($ABUPdd) = "11" Then $ABUPV = 4 Case $OFFICE07cb If GUICtrlRead($OFFICE07cb) = $GUI_CHECKED Then $OFFICE07 = 1 If GUICtrlRead($OFFICE07cb) = $GUI_UNCHECKED Then $OFFICE07 = 0 Case $OFFICE07dd If GUICtrlRead($OFFICE07dd) = "STD" Then $OF07V = 2 If GUICtrlRead($OFFICE07dd) = "PRO" Then $OF07V = 3 Case $OFFICE10cb If GUICtrlRead($OFFICE10cb) = $GUI_CHECKED Then $OFFICE10 = 1 If GUICtrlRead($OFFICE10cb) = $GUI_UNCHECKED Then $OFFICE10 = 0 Case $OFFICE10dd If GUICtrlRead($OFFICE10dd) = "STD" Then $OF10V = 2 If GUICtrlRead($OFFICE10dd) = "PRO" Then $OF10V = 3 Case $GISEcb If GUICtrlRead($GISEcb) = $GUI_CHECKED Then $GISE = 1 If GUICtrlRead($GISEcb) = $GUI_UNCHECKED Then $GISE = 0 Case $AD12cb If GUICtrlRead($AD12cb) = $GUI_CHECKED Then $AD12cb = 1 If GUICtrlRead($AD12cb) = $GUI_UNCHECKED Then $AD12cb = 0 Case $SOPHOScb If GUICtrlRead($SOPHOScb) = $GUI_CHECKED Then $SOPHOS = 1 If GUICtrlRead($SOPHOScb) = $GUI_UNCHECKED Then $SOPHOS = 0 Case $AB09dd If GUICtrlRead($AB09dd) = "STD" Then $AB09V = 2 If GUICtrlRead($AB09dd) = "PRO" Then $AB09V = 3 Case $AB10dd If GUICtrlRead($AB10dd) = "STD" Then $AB10V = 2 If GUICtrlRead($AB10dd) = "PRO" Then $AB10V = 3 Case $AB11dd If GUICtrlRead($AB11dd) = "STD" Then $AB11V = 2 If GUICtrlRead($AB11dd) = "PRO" Then $AB11V = 3 Case $Run Run01() Case $close Exit Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Run01() If $F = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "uninstall_flash_player.exe", $Server & $Software, @SW_ENABLE) $P+=33 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "install_flash_player.exe", $Server & $Software,@SW_ENABLE) $P+=33 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "install_flash_player_ax.exe", $Server & $Software, @SW_ENABLE) $P+=33 GUICtrlSetData($Progress1, $P) EndIf If $J = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "jre-7u9-windows-i586.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $FF = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "FirefoxSetupV15.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $IE9 = 1 Then If @OSArch = "X86" Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "IE9-Windows7-x86-enu.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If @OSArch = "X64" Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "IE9-Windows7-x64-enu.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $GC = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "ChromeStandaloneSetup.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $DX9 = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "DX9DXSETUP.exe", $Server & $Software & "DX9", @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $CCCP = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "Combined-Community-Codec-Pack-2011-11-11.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $SD = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "SmartDefragV2.6.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $SC = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "SlimCleaner-setup.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $GISE = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "ArcGISExplorerDownload.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $AD12 = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "SetupDesignReview2012_bundle.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $SOPHOS = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $SOPHOSsrv & "setup.exe", $SOPHOSsrv, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $MOS = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $MSISoftware & "Full InstallsMOS_6_3_585_WEB_FullInstallsetup.exe", $Server & $MSISoftware & "Full InstallsMOS_6_3_585_WEB_FullInstall", @SW_ENABLE) $P+=50 If @OSArch = "X86" Then FileCopy( $Server & $MSISoftware & "Full InstallsMOS_6_3_585_WEB_FullInstallMunicipal Offense System.exe.config", $ProgramFiles & "Municipal Systems, IncMunicipal Offense System 6Municipal Offense System.exe.config") $P+=50 GUICtrlSetData($Progress1, $P) EndIf If @OSArch = "X64" Then FileCopy( $Server & $MSISoftware & "Full InstallsMOS_6_3_585_WEB_FullInstallMunicipal Offense System.exe.config", $ProgramFiles86 & "Municipal Systems, IncMunicipal Offense System 6Municipal Offense System.exe.config") $P+=50 GUICtrlSetData($Progress1, $P) EndIf EndIf If $MOVE = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $MSISoftware & "Full InstallsMove_60581_FullInstallsetup.exe", $Server & $MSISoftware & "Full InstallsMove_60581_FullInstall", @SW_ENABLE) $P+=50 If @OSArch = "X86" Then FileCopy( $Server & $MSISoftware & "Full InstallsMove_60581_FullInstallDBKey.cfg", $ProgramFiles & "Municipal Systems, IncMunicipal Offense Violation EnforcementDBKey.cfg") FileCopy( $Server & $MSISoftware & "Full InstallsMove_60581_FullInstallServer.cfg", $ProgramFiles & "Municipal Systems, IncMunicipal Offense Violation EnforcementServer.cfg.cfg") $P+=50 GUICtrlSetData($Progress1, $P) EndIf If @OSArch = "X64" Then FileCopy( $Server & $MSISoftware & "Full InstallsMove_60581_FullInstallDBKey.cfg", $ProgramFiles86 & "Municipal Systems, IncMunicipal Offense Violation EnforcementDBKey.cfg") FileCopy( $Server & $MSISoftware & "Full InstallsMove_60581_FullInstallServer.cfg", $ProgramFiles86 & "Municipal Systems, IncMunicipal Offense Violation EnforcementServer.cfg.cfg") $P+=50 GUICtrlSetData($Progress1, $P) EndIf EndIf If $UD = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $MSISoftware & "Full InstallsMove_60581_FullInstallsetup.exe", $Server & $MSISoftware & "Full InstallsMove_60581_FullInstall", @SW_ENABLE) $P+=50 If @OSArch = "X86" Then FileCopy( $Server & $MSISoftware & "Full InstallsUD115WebFullInstallconfig.xml", $ProgramFiles & "Municipal Systems, IncUniveral Docketconfig.xml") $P+=50 GUICtrlSetData($Progress1, $P) EndIf If @OSArch = "X64" Then FileCopy( $Server & $MSISoftware & "Full InstallsUD115WebFullInstallconfig.xml", $ProgramFiles86 & "Municipal Systems, IncUniveral Docketconfig.xml") $P+=50 GUICtrlSetData($Progress1, $P) EndIf EndIf If $IT = 1 Then If @OSArch = "X86" Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "iTunes32Setup.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If @OSArch = "X64" Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "iTunes64Setup.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $TF = 1 Then If @OSArch = "X86" Then If @OSVersion = "Win_XP" Then $P=0 GUICtrlSetData($Progress1, $P) DirCreate("C:ProgramData") FileCopy( "10.10.20.59ISPublicScriptsIconsTimeForce.ico", "C:ProgramDataTimeforce.ico") FileCopy( $Server & $Software & "Timeforce.url", "C:Documents and SettingsAll UsersDesktopTimeforce.url") $P+=100 GUICtrlSetData($Progress1, $P) EndIf If @OSVersion = "Win_7" Then $P=0 GUICtrlSetData($Progress1, $P) FileCopy( "10.10.20.59ISPublicScriptsIconsTimeForce.ico", "C:ProgramDataTimeforce.ico") FileCopy( $Server & $Software & "Timeforce.url", "C:UsersPublicDesktopTimeforce.url") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If @OSArch = "X64" Then $P=0 GUICtrlSetData($Progress1, $P) FileCopy( "10.10.20.59ISPublicScriptsIconsTimeForce.ico", "C:ProgramDataTimeforce.ico") FileCopy( $Server & $Software & "Timeforce.url", "C:UsersPublicDesktopTimeforce.url") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $SPB = 1 Then If @OSArch = "X86" Then If @OSVersion = "Win_XP" Then $P=0 GUICtrlSetData($Progress1, $P) DirCreate("C:ProgramData") FileCopy( "10.10.20.59ISPublicScriptsIconsspringbrookv7.ico", "C:ProgramDataspringbrookv7.ico") FileCopy( $Server & $Software & "Springbrook Menu.Ink", "C:Documents and SettingsAll UsersDesktopSpringbrook Menu.Ink") $P+=100 GUICtrlSetData($Progress1, $P) EndIf If @OSVersion = "Win_7" Then $P=0 GUICtrlSetData($Progress1, $P) FileCopy( "10.10.20.59ISPublicScriptsIconsspringbrookv7.ico", "C:ProgramDataspringbrookv7.ico") FileCopy( $Server & $Software & "Springbrook Menu.Ink", "C:UsersPublicDesktopSpringbrook Menu.Ink") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If @OSArch = "X64" Then $P=0 GUICtrlSetData($Progress1, $P) FileCopy( "10.10.20.59ISPublicScriptsIconsspringbrookv7.ico", "C:ProgramDataspringbrookv7.ico") FileCopy( $Server & $Software & "Springbrook Menu.Ink", "C:UsersPublicDesktopSpringbrook Menu.Ink") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $FHWEB = 1 Then If @OSArch = "X86" Then If @OSVersion = "Win_XP" Then $P=0 GUICtrlSetData($Progress1, $P) DirCreate("C:ProgramData") FileCopy( "10.10.20.59ISPublicScriptsIconsfh_shield.ico", "C:ProgramDatafh_shield.ico") FileCopy( $Server & $Software & "Firehouse Web Inside.url", "C:Documents and SettingsAll UsersDesktopFirehouse Web Inside.url") FileCopy( $Server & $Software & "Firehouse Web Outside.url", "C:UsersPublicDesktopFirehouse Web Outside.url") $P+=100 GUICtrlSetData($Progress1, $P) EndIf If @OSVersion = "Win_7" Then $P=0 GUICtrlSetData($Progress1, $P) FileCopy( "10.10.20.59ISPublicScriptsIconsfh_shield.ico", "C:ProgramDatafh_shield.ico") FileCopy( $Server & $Software & "Firehouse Web Inside.url", "C:UsersPublicDesktopFirehouse Web Inside.url") FileCopy( $Server & $Software & "Firehouse Web Outside.url", "C:UsersPublicDesktopFirehouse Web Outside.url") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If @OSArch = "X64" Then $P=0 GUICtrlSetData($Progress1, $P) FileCopy( "10.10.20.59ISPublicScriptsIconsfh_shield.ico", "C:ProgramDatafh_shield.ico") FileCopy( $Server & $Software & "Firehouse Web Inside.url", "C:UsersPublicDesktopFirehouse Web Inside.url") FileCopy( $Server & $Software & "Firehouse Web Outside.url", "C:UsersPublicDesktopFirehouse Web Outside.url") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $LF = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & "10.10.20.21Laserfiche Avante 8.3.1Setup.exe", "10.10.20.21Laserfiche Avante 8.3.1", @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $FOXIT = 1 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $Software & "FoxitReader531.0606_enu_Setup.exe", $Server & $Software, @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $AB09 = 1 Then If $AB09V = 2 Then $P=0 GUICtrlSetData($Progress1, $P) Run ( "notepad.exe " & $ISSoftware & "Adobe 9 STDlicense.txt", @WindowsDir, @SW_ENABLE) RunWait( @ComSpec & " /C " & $Server & $ISSoftware & "Adobe 9 STDAdobe Acrobat 9 StdAdobe Acrobat 9 StandardFoxitReader531.0606_enu_Setup.exe", $Server & $ISSoftware & "Adobe 9 STDAdobe Acrobat 9 StdAdobe Acrobat 9 Standard", @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $AB09V = 3 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Adobe Acrobat 9 Pro", "Adobe Acrobat 09 Pro") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $AB10 = 1 Then If $AB10V = 2 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Adobe Acrobat 10 STD", "Adobe Acrobat 10 STD") $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $AB10V = 3 Then $P=0 GUICtrlSetData($Progress1, $P) Run ( "notepad.exe " & $ISSoftware & "Adobe 10 Prolicense.txt", @WindowsDir, @SW_ENABLE) RunWait( @ComSpec & " /C " & $Server & $ISSoftware & "Adobe 10 ProAdobe Acrobat Xsetup.exe", $Server & $ISSoftware & "Adobe 10 ProAdobe Acrobat X", @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $AB11 = 1 Then If $AB11V = 2 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Adobe Acrobat 11 STD", "Adobe Acrobat 11 STD") $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $AB11V = 3 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Adobe Acrobat 11 Pro", "Adobe Acrobat 11 Pro") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $OFFICE07 = 1 Then Msgbox (0, "Microsoft Office 2007", "Office 2007 " & $OF07V) If $OF07V = 2 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $ISSoftware & "Office 2007office2007stdinstallsetup.exe", $Server & $ISSoftware & "Office 2007office2007stdinstall", @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $OF07V = 3 Then $P=0 GUICtrlSetData($Progress1, $P) RunWait( @ComSpec & " /C " & $Server & $ISSoftware & "Office 2007officePROInstallsetup.exe", $Server & $ISSoftware & "Office 2007officePROInstall", @SW_ENABLE) $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $OFFICE10 = 1 Then Msgbox (0, "Microsoft Office 2010", "Office 2010 is " & $OF10V & " " & $OFFICE10dd) If $OF10V = 2 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Microsoft Office 2010 STD", "Microsoft Office 2010 STD") $P+=100 GUICtrlSetData($Progress1, $P) EndIf If $OF10V = 3 Then $P=0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Microsoft Office 2010 Pro", "Microsoft Office 2010 Pro") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf If $ABUP = 1 Then If $ABUPV = 2 Then $P = 0 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd910_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd911_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd912_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd913_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd920_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd930_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd931_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd932_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd933_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd934_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd940_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd941_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd942_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd943_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd944_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd945_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd946_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd947_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd950_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd951_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd952_all_incr.msp REINSTALL=ALL", $Server & $Adobe9) $P+=4 GUICtrlSetData($Progress1, $P) EndIf If $ABUPV = 3 Then $P = 0 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1001_Tier1.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1001_Tier2.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1001_Tier3.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1001_Tier4.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatSecUpd1002.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatSecUpd1003.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1010.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1011.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1012.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatSecUpd1013.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) RunWait( "msiexec /qn /p AcrobatUpd1014.msp REINSTALL=ALL", $Server & $Adobe10) $P+=9 GUICtrlSetData($Progress1, $P) EndIf If $ABUPV = 4 Then $P = 0 GUICtrlSetData($Progress1, $P) Msgbox (0, "Adobe Acrobat 11", "Adobe Acrobat 11 Updater") $P+=100 GUICtrlSetData($Progress1, $P) EndIf EndIf EndFunc Edited November 19, 2012 by Zeronic Link to comment Share on other sites More sharing options...
BrewManNH Posted November 19, 2012 Share Posted November 19, 2012 Do yourself a favor the next time you need something like this, if something can only have 2 conditions, in this case Checked or Unchecked, there's no need to check for both, check for one of them and if that one isn't true then the other one HAS to be true. Case in point, this code: Case $FLASHcb If GUICtrlRead($FLASHcb) = $GUI_CHECKED Then $F = 1 If GUICtrlRead($FLASHcb) = $GUI_UNCHECKED Then $F = 0 Should be written like this. Case $FLASHcb If GUICtrlRead($FLASHcb) = $GUI_CHECKED Then $F = 1 Else $F = 0 Endif If $Flashcb isn't checked, it HAS to be unchecked, so there's no need to test if it is unchecked, just assume it is because it's not going to change state in between those two tests. You will save yourself a LOT of typing this way, and it's a lot easier to trace what your script is doing. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
Zeronic Posted November 20, 2012 Author Share Posted November 20, 2012 (edited) Thanks BrewManHM for the advice, I'll have to put that in my notes and update my script. Do you see any reason why the $OFFICE10dd and $OF10V are having problems, all the others work just fine with the same syntax. So I'm kind of puzzled why only that section of it isn't working. expandcollapse popupWhile 1 $nMsg = GUIGetMsg() Switch $nMsg Case $FLASHcb If GUICtrlRead($FLASHcb) = $GUI_CHECKED Then $F = 1 Else $F = 0 Endif Case $JAVAcb If GUICtrlRead($JAVAcb) = $GUI_CHECKED Then $J = 1 Else $J = 0 EndIf Case $FIREFOXcb If GUICtrlRead($FIREFOXcb) = $GUI_CHECKED Then $FF = 1 Else $FF = 0 EndIf Case $IE9cb If GUICtrlRead($IE9cb) = $GUI_CHECKED Then $IE9 = 1 Else $IE9 = 0 EndIf Case $AB9cb If GUICtrlRead($AB9cb) = $GUI_CHECKED Then $AB09 = 1 Else $AB09 = 0 EndIf Case $AB10cb If GUICtrlRead($AB10cb) = $GUI_CHECKED Then $AB10 = 1 Else $AB10 = 0 EndIf Case $AB11cb If GUICtrlRead($AB11cb) = $GUI_CHECKED Then $AB11 = 1 Else $AB11 = 0 EndIf Case $SDcb If GUICtrlRead($SDcb) = $GUI_CHECKED Then $SD = 1 Else $SD = 0 EndIf Case $SCcb If GUICtrlRead($SCcb) = $GUI_CHECKED Then $SC = 1 Else $SD = 0 EndIf Case $ITcb If GUICtrlRead($ITcb) = $GUI_CHECKED Then $IT = 1 Else $IT = 0 EndIf Case $GCcb If GUICtrlRead($GCcb) = $GUI_CHECKED Then $GC = 1 Else $GC = 0 EndIf Case $DX9cb If GUICtrlRead($DX9cb) = $GUI_CHECKED Then $DX9 = 1 Else $DX9 = 0 EndIf Case $CCCPcb If GUICtrlRead($CCCPcb) = $GUI_CHECKED Then $CCCP = 1 Else $CCP = 0 EndIf Case $MOScb If GUICtrlRead($MOScb) = $GUI_CHECKED Then $MOS = 1 Else $MOS = 0 EndIf Case $MOVEcb If GUICtrlRead($MOVEcb) = $GUI_CHECKED Then $MOVE = 1 Else $MOVE = 0 EndIf Case $UDcb If GUICtrlRead($UDcb) = $GUI_CHECKED Then $UD = 1 Else $UD = 0 EndIf Case $TFcb If GUICtrlRead($TFcb) = $GUI_CHECKED Then $TF = 1 Else $TF = 0 EndIf Case $SPBcb If GUICtrlRead($SPBcb) = $GUI_CHECKED Then $SPB = 1 Else $SPB = 0 EndIf Case $FHWEBcb If GUICtrlRead($FHWEBcb) = $GUI_CHECKED Then $FHWEB = 1 Else $FHWEB = 0 EndIf Case $LFcb If GUICtrlRead($LFcb) = $GUI_CHECKED Then $LF = 1 Else $LF = 0 EndIf Case $FOXITcb If GUICtrlRead($FOXITcb) = $GUI_CHECKED Then $FOXIT = 1 Else $FOXIT = 0 EndIf Case $ABUPcb If GUICtrlRead($ABUPcb) = $GUI_CHECKED Then $ABUP = 1 Else $ABUP = 0 EndIf Case $ABUPdd If GUICtrlRead($ABUPdd) = "09" Then $ABUPV = 2 If GUICtrlRead($ABUPdd) = "10" Then $ABUPV = 3 If GUICtrlRead($ABUPdd) = "11" Then $ABUPV = 4 Case $OFFICE07cb If GUICtrlRead($OFFICE07cb) = $GUI_CHECKED Then $OFFICE07 = 1 Else $OFFICE07 = 0 EndIf Case $OFFICE07dd If GUICtrlRead($OFFICE07dd) = "STD" Then $OF07V = 2 Else $OF07V = 3 EndIf Case $OFFICE10cb If GUICtrlRead($OFFICE10cb) = $GUI_CHECKED Then $OFFICE10 = 1 Else $OFFICE10 = 0 EndIf Case $OFFICE10dd If GUICtrlRead($OFFICE10dd) = "STD" Then $OF10V = 2 Else $OF10V = 3 EndIf Case $GISEcb If GUICtrlRead($GISEcb) = $GUI_CHECKED Then $GISE = 1 Else $GISE = 0 EndIf Case $AD12cb If GUICtrlRead($AD12cb) = $GUI_CHECKED Then $AD12 = 1 Else $AD12 = 0 EndIf Case $SOPHOScb If GUICtrlRead($SOPHOScb) = $GUI_CHECKED Then $SOPHOS = 1 Else $SOPHOS = 0 EndIf Case $AB09dd If GUICtrlRead($AB09dd) = "STD" Then $AB09V = 2 Else $AB09V = 3 EndIf Case $AB10dd If GUICtrlRead($AB10dd) = "STD" Then $AB10V = 2 Else $AB10V = 3 EndIf Case $AB11dd If GUICtrlRead($AB11dd) = "STD" Then $AB11V = 2 Else $AB11V = 3 EndIf Case $Run Run01() Case $close Exit Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited November 20, 2012 by Zeronic Link to comment Share on other sites More sharing options...
BrewManNH Posted November 20, 2012 Share Posted November 20, 2012 (edited) This line: $OFFICE10dd = GUICtrlCreateCombo("", 656, 136, 65, 30, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) Is pointing to the combobox next to the Acrobat 10 checkbox. While this line: $AB10dd = GUICtrlCreateCombo("", 656, 296, 65, 30, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL)) Is pointing to the combobox next to the Office 2010 checkbox. Your comboboxes are in the wrong location on the GUI so when you change the one next to Office 2010, you're actually changing the information for the Acrobat 10 install. EDIT: BTW, I didn't check the other controls in the script to see if they're positioned correctly or that the variables are assigned to the correct control. I only noticed those 2 were reversed. Edited November 20, 2012 by BrewManNH If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator Link to comment Share on other sites More sharing options...
Zeronic Posted November 20, 2012 Author Share Posted November 20, 2012 Thanks again, BrewManHM, I didn't even think to check the box locations. Going forward I might create more comments in my scripts to detail each control set, to help myself keep track of these things. Link to comment Share on other sites More sharing options...
BrewManNH Posted November 20, 2012 Share Posted November 20, 2012 The problem wasn't that there was anything wrong with the script and how it worked, it was just that the locations for the controls were wrong which is easy to have happen especially if you use Koda. You move a control to another location on the form, but forget that the new controls are added after it and there's no way to reorder the list of controls in Koda. Which is why I recommend not using Koda once you get the basics down, it can cause more troubleshooting issues than it's worth in time savings when creating the GUI in the first place. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator 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