cotax Posted May 5, 2010 Share Posted May 5, 2010 (edited) Hi, I made a little program with check boxes to check the things u want to install. everything was fine and worked fine untill i tried to color my progressbar. It was only 1 line so i removed the line, and from now on my script doesnt want to install anything anymore. Check and uncheck works fine, but when i press the "installeren" button, it wont do anything (its not even giving an error). Can u tell me what is missing or what i did wrong? becouse everything was fine before. Thank you. Here is my script:(the comments are in dutch hope this will not stop u from helping me ) expandcollapse popup#include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) GUICreate("Jeroen's Installatie menu", 400, 400) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUICtrlCreateLabel("KIES DE PROGRAMMA(S) DIE JE WILT INSTALLEREN.", 60, 10) $hCheck_alles = GUICtrlCreateCheckbox("Alles Selecteren / Unlocken","10","75") $hCheck_niks = GUICtrlCreateCheckbox("Niks Selecteren","200","75") ;Linker Rij $hCheck_1 = GUICtrlCreateCheckbox("FTDv3.8","10","200") ;nr 6 $hCheck_2 = GUICtrlCreateCheckbox("Shortcut","85","200") ;nr 7 $hCheck_3 = GUICtrlCreateCheckbox("Video kaart","10","125") ;nr 8 $hCheck_4 = GUICtrlCreateCheckbox("G15 Toetsenbord","10","150") ;nr 9 $hCheck_5 = GUICtrlCreateCheckbox("Everest","10","175") ;nr 10 $hCheck_6 = GUICtrlCreateCheckbox("+Lcd sherm","85","175") ;nr 11 $hCheck_7 = GUICtrlCreateCheckbox("Bureaublad Shortcuts","10","225") ;nr 12 $hCheck_8 = GUICtrlCreateCheckbox("Winamp + Plugin","10","250") ;nr 13 $hCheck_9 = GUICtrlCreateCheckbox("Autoit v3","10","275") ;nr 14 ;Rechter Rij $hCheck_10 = GUICtrlCreateCheckbox("K-lite Codec pack","200","125") ;nr 15 $hCheck_11 = GUICtrlCreateCheckbox("Winrar","200","150") ;nr 16 $hCheck_12 = GUICtrlCreateCheckbox("Skype","200","175") ;nr 17 $hCheck_13 = GUICtrlCreateCheckbox("Arcsof total media theatre 3.0","200","200") ;nr 18 $hCheck_14 = GUICtrlCreateCheckbox("Fraps","200","225") ;nr 19 $hCheck_15 = GUICtrlCreateCheckbox("Alcohol 120","200","250") ;nr 20 ;hier de max aantal wijzigen $hCheck_Aantal = $hCheck_15 $Installeren = GUICtrlCreateButton("Installeren", 150, 360, 100) GUISetOnEvent($Installeren, "Installeren") $Progress1 = GUICtrlCreateProgress(50, 315, 300, 17) ;Maakt een progressbar aan. GUISetState(@SW_SHOW) ; De while zorgt ervoor dat de window open blijft While 1 If GUICtrlRead($hCheck_1) = $GUI_CHECKED Then GUICtrlSetState($hCheck_2, $GUI_UNCHECKED) ;Ftd geselecteerd zet Shortcut uit. EndIf If GUICtrlRead($hCheck_5) = $GUI_CHECKED Then GUICtrlSetState($hCheck_6, $GUI_UNCHECKED) ;Everest geselecteerd zet +Lcd uit. EndIf If GUICtrlRead($hCheck_alles) = $GUI_CHECKED Then For $i = $hCheck_1 To $hCheck_Aantal ;Als alles selecteren is geselecteerd, selecteer dan alles. GUICtrlSetState($i, $GUI_CHECKED) Next GUICtrlSetState($hCheck_alles, $GUI_UNCHECKED) GUICtrlSetState($hCheck_1, $GUI_UNCHECKED) ;Uitvinken van Ftd en Everest en alles selecteren. GUICtrlSetState($hCheck_5, $GUI_UNCHECKED) EndIf If GUICtrlRead($hCheck_niks) = $GUI_CHECKED Then GUICtrlSetState($hCheck_alles, $GUI_UNCHECKED) GUICtrlSetState($hCheck_niks, $GUI_UNCHECKED) ;als niks selecteren is geselecteerd dan alles uitvinken. For $i = $hCheck_1 To $hCheck_Aantal GUICtrlSetState($i, $GUI_UNCHECKED) Next EndIf WEnd ; Als op installeren knop word geklikt Func Installeren() For $i = $hCheck_1 To $hCheck_Aantal If GUICtrlRead($i) = $GUI_CHECKED Then ;Kijken wat geselecteerd is. ;Aan variable programma een bestand pad toewijzen doormiddel van de variable i en een waarde geven aan de progressbar. if $i = 6 Then GUICtrlSetData($Progress1, 0) $Programma = "Ftd" ElseIf $i = 7 Then GUICtrlSetData($Progress1, 3) $Programma = "Ftd\Shortcut" ;Shortcut ElseIf $i = 8 Then GUICtrlSetData($Progress1, 4) $Programma = "Videokaart" ElseIf $i = 9 Then GUICtrlSetData($Progress1, 20) $Programma = "G15 toetsenbord" ElseIf $i = 10 Then GUICtrlSetData($Progress1, 35) $Programma = "Everest" ElseIf $i = 11 Then GUICtrlSetData($Progress1, 40) $Programma = "Everest\Lcd" ;Lcd scherm ElseIf $i = 12 Then GUICtrlSetData($Progress1, 45) $Programma = "Bureaublad shortcuts" ElseIf $i = 13 Then GUICtrlSetData($Progress1, 47) $Programma = "Winamp" ElseIf $i = 14 Then GUICtrlSetData($Progress1, 52) $Programma = "Autoit" ElseIf $i = 15 Then GUICtrlSetData($Progress1, 55) $Programma = "K-lite codec pack" ElseIf $i = 16 Then GUICtrlSetData($Progress1, 65) $Programma = "Winrar" ElseIf $i = 17 Then GUICtrlSetData($Progress1, 68) $Programma = "Skype" ElseIf $i = 18 Then GUICtrlSetData($Progress1, 78) $Programma = "Arcsof total media theatre 3.0" ElseIf $i = 19 Then GUICtrlSetData($Progress1, 90) $Programma = "Fraps" ElseIf $i = 20 Then GUICtrlSetData($Progress1, 95) $Programma = "Alcohol 120" EndIf RunWait($Programma &"\Installer.exe") ;de bestandspad afmaken en de desbetreffende installer starten. EndIf Next GUICtrlSetData($Progress1, 100) MsgBox(0, "Melding", "Installatie is Voltooid.") EndFunc ;Sluit de window als er op de sluitknop van het venster word geklikt. Func CLOSEClicked() Exit EndFunc Edited May 5, 2010 by cotax Link to comment Share on other sites More sharing options...
exodius Posted May 5, 2010 Share Posted May 5, 2010 (edited) GUICtrlSetOnEvent($Installeren, "Installeren") The devil is in the details. Edited May 5, 2010 by exodius Link to comment Share on other sites More sharing options...
cotax Posted May 5, 2010 Author Share Posted May 5, 2010 OMG how could i have missed that one XD lol the last hour only trying to find out whats wrong. Its so little, and stoopid, cant even remember that i removed that one and why XD Thanks alot, fresh eyes does the trick 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