Jump to content
Sign in to follow this  

my program isnt working anymore (solved)

Recommended Posts


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 :idea: )

#include <GUIConstantsEx.au3>

Opt("GUIOnEventMode", 1)   

GUICreate("Jeroen's Installatie menu", 400, 400)



$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.


; 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.
        If  GUICtrlRead($hCheck_5) = $GUI_CHECKED Then
            GUICtrlSetState($hCheck_6, $GUI_UNCHECKED) ;Everest geselecteerd zet +Lcd uit.
        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)
            GUICtrlSetState($hCheck_alles, $GUI_UNCHECKED)
            GUICtrlSetState($hCheck_1, $GUI_UNCHECKED) ;Uitvinken van Ftd en Everest en alles selecteren.
            GUICtrlSetState($hCheck_5, $GUI_UNCHECKED)

        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)

; 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"
        RunWait($Programma &"\Installer.exe") ;de bestandspad afmaken en de desbetreffende installer starten.


        GUICtrlSetData($Progress1, 100)
        MsgBox(0, "Melding", "Installatie is Voltooid.")


;Sluit de window als er op de sluitknop van het venster word geklikt. 
Func CLOSEClicked()
Edited by cotax

Share this post

Link to post
Share on other sites

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 :idea:

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...