Sign in to follow this  
Followers 0
jowaju

Help with Checkboxes

12 posts in this topic

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Spyware/Antivirus Quick Installer", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + 

$WS_CLIPSIBLINGS)

$Icon_1 = GuiCtrlCreateIcon("AAW.ico", "Icon1", 60, 40, 32, 32)
$Icon_2 = GuiCtrlCreateIcon("SB13.ico", "Icon2", 60, 80, 32, 32)
$Icon_3 = GuiCtrlCreateIcon("SSP.ico", "Icon3", 60, 120, 32, 32)
$Icon_4 = GuiCtrlCreateIcon("SSWEEP.ico", "Icon4", 60, 160, 32, 32)
$Icon_5 = GuiCtrlCreateIcon("PP4.ico", "Icon5", 60, 200, 32, 32)
$Icon_6 = GuiCtrlCreateIcon("EZAV.ico", "Icon6", 60, 240, 32, 32)
$Icon_7 = GuiCtrlCreateIcon("CS.ico", "Icon7", 230, 40, 32, 32)
$Icon_8 = GuiCtrlCreateIcon("SCG.ico", "Icon8", 230, 80, 32, 32)
$Icon_9 = GuiCtrlCreateIcon("SWB33.ico", "Icon9", 230, 120, 32, 32)
$Icon_10 = GuiCtrlCreateIcon("MSAS.ico", "Icon10", 230, 160, 32, 32)
$Icon_11 = GuiCtrlCreateIcon("PP5.ico", "Icon11", 230, 200, 32, 32)
$Icon_12 = GuiCtrlCreateIcon("AVG7.ico", "Icon12", 230, 240, 32, 32)
$Button_13 = GuiCtrlCreateButton("Install Selected", 140, 290, 100, 20)
$Checkbox_14 = GuiCtrlCreateCheckbox("Checkbox14", 45, 50, 10, 20)
$Checkbox_15 = GuiCtrlCreateCheckbox("Checkbox15", 45, 90, 10, 20)
$Checkbox_16 = GuiCtrlCreateCheckbox("Checkbox16", 45, 130, 10, 20)
$Checkbox_17 = GuiCtrlCreateCheckbox("Checkbox17", 45, 170, 10, 20)
$Checkbox_18 = GuiCtrlCreateCheckbox("Checkbox18", 45, 210, 10, 20)
$Checkbox_19 = GuiCtrlCreateCheckbox("Checkbox19", 45, 250, 10, 20)
$Checkbox_20 = GuiCtrlCreateCheckbox("Checkbox20", 215, 50, 10, 20)
$Checkbox_21 = GuiCtrlCreateCheckbox("Checkbox21", 215, 90, 10, 20)
$Checkbox_22 = GuiCtrlCreateCheckbox("Checkbox22", 215, 130, 10, 20)
$Checkbox_23 = GuiCtrlCreateCheckbox("Checkbox23", 215, 170, 10, 20)
$Checkbox_24 = GuiCtrlCreateCheckbox("Checkbox24", 215, 210, 10, 20)
$Checkbox_25 = GuiCtrlCreateCheckbox("Checkbox25", 215, 250, 10, 20)
$Label_26 = GuiCtrlCreateLabel("Choose Which Programs to Install", 110, 10, 180, 20)
$Label_27 = GuiCtrlCreateLabel("AdAware SE 1.05", 100, 50, 100, 40)
$Label_28 = GuiCtrlCreateLabel("Spybot 1.3", 100, 90, 100, 40)
$Label_29 = GuiCtrlCreateLabel("SpySubtract Pro", 100, 130, 100, 40)
$Label_30 = GuiCtrlCreateLabel("SpySweeper", 100, 170, 100, 40)
$Label_31 = GuiCtrlCreateLabel("PestPatrol 4*", 100, 210, 100, 40)
$Label_32 = GuiCtrlCreateLabel("Etrust 2005*", 100, 250, 100, 40)
$Label_33 = GuiCtrlCreateLabel("CounterSpy", 270, 50, 100, 40)
$Label_34 = GuiCtrlCreateLabel("Spy Cleaner Gold", 270, 90, 100, 40)
$Label_35 = GuiCtrlCreateLabel("Spyware Blaster 3.3", 270, 130, 100, 40)
$Label_36 = GuiCtrlCreateLabel("MS AntiSpyware", 270, 170, 100, 40)
$Label_37 = GuiCtrlCreateLabel("PestPatrol 5*", 270, 210, 100, 40)
$Label_38 = GuiCtrlCreateLabel("AVG 7.0*", 270, 250, 100, 40)
$Label_39 = GuiCtrlCreateLabel("Items with * cannot be installed together with the item across from it.", 5, 280, 118, 40)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit

I'm trying to make an easy installer for the programs listed. I already have the au3 scripts for each individual program created and verified working properly. All I need now is a way to check to see which boxes are checked and begin the appropriate installs after the user clicks the button at the bottom. I spent all last night trying to figure out a way to do this, but I'm not a coder by nature, so this is a bit overwhelming for me. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites



While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button_13
        If GUICtrlRead($Checkbox_14) = $GUI_CHECKED Then; run install
        If GUICtrlRead($Checkbox_15) = $GUI_CHECKED Then; run install
        ; etc
        ExitLoop
    Case Else
   ;;;
    EndSelect
WEnd


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

:) consider it kicked.

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Spyware/Antivirus Quick Installer", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

Dim $Icon[13],$Checkbox[13],$Label[13]
$Icon[0] = 12
$Checkbox[0] = 12
$Label[0] = 12

$Icon[1] = GuiCtrlCreateIcon("AAW.ico", "Icon1", 60, 40, 32, 32)
$Icon[2] = GuiCtrlCreateIcon("SB13.ico", "Icon2", 60, 80, 32, 32)
$Icon[3] = GuiCtrlCreateIcon("SSP.ico", "Icon3", 60, 120, 32, 32)
$Icon[4] = GuiCtrlCreateIcon("SSWEEP.ico", "Icon4", 60, 160, 32, 32)
$Icon[5] = GuiCtrlCreateIcon("PP4.ico", "Icon5", 60, 200, 32, 32)
$Icon[6] = GuiCtrlCreateIcon("EZAV.ico", "Icon6", 60, 240, 32, 32)
$Icon[7] = GuiCtrlCreateIcon("CS.ico", "Icon7", 230, 40, 32, 32)
$Icon[8] = GuiCtrlCreateIcon("SCG.ico", "Icon8", 230, 80, 32, 32)
$Icon[9] = GuiCtrlCreateIcon("SWB33.ico", "Icon9", 230, 120, 32, 32)
$Icon[10] = GuiCtrlCreateIcon("MSAS.ico", "Icon10", 230, 160, 32, 32)
$Icon[11] = GuiCtrlCreateIcon("PP5.ico", "Icon11", 230, 200, 32, 32)
$Icon[12] = GuiCtrlCreateIcon("AVG7.ico", "Icon12", 230, 240, 32, 32)

$Button_13 = GuiCtrlCreateButton("Install Selected", 140, 290, 100, 20)
$Checkbox[1] = GuiCtrlCreateCheckbox("Checkbox14", 45, 50, 10, 20)
$Checkbox[2] = GuiCtrlCreateCheckbox("Checkbox15", 45, 90, 10, 20)
$Checkbox[3] = GuiCtrlCreateCheckbox("Checkbox16", 45, 130, 10, 20)
$Checkbox[4] = GuiCtrlCreateCheckbox("Checkbox17", 45, 170, 10, 20)
$Checkbox[5] = GuiCtrlCreateCheckbox("Checkbox18", 45, 210, 10, 20)
$Checkbox[6] = GuiCtrlCreateCheckbox("Checkbox19", 45, 250, 10, 20)
$Checkbox[7] = GuiCtrlCreateCheckbox("Checkbox20", 215, 50, 10, 20)
$Checkbox[8] = GuiCtrlCreateCheckbox("Checkbox21", 215, 90, 10, 20)
$Checkbox[9] = GuiCtrlCreateCheckbox("Checkbox22", 215, 130, 10, 20)
$Checkbox[10] = GuiCtrlCreateCheckbox("Checkbox23", 215, 170, 10, 20)
$Checkbox[11] = GuiCtrlCreateCheckbox("Checkbox24", 215, 210, 10, 20)
$Checkbox[12] = GuiCtrlCreateCheckbox("Checkbox25", 215, 250, 10, 20)
$Label1 = GuiCtrlCreateLabel("Choose Which Programs to Install", 110, 10, 180, 20)
$Label[1] = GuiCtrlCreateLabel("AdAware SE 1.05", 100, 50, 100, 40)
$Label[2] = GuiCtrlCreateLabel("Spybot 1.3", 100, 90, 100, 40)
$Label[3] = GuiCtrlCreateLabel("SpySubtract Pro", 100, 130, 100, 40)
$Label[4] = GuiCtrlCreateLabel("SpySweeper", 100, 170, 100, 40)
$Label[5] = GuiCtrlCreateLabel("PestPatrol 4*", 100, 210, 100, 40)
$Label[6] = GuiCtrlCreateLabel("Etrust 2005*", 100, 250, 100, 40)
$Label[7] = GuiCtrlCreateLabel("CounterSpy", 270, 50, 100, 40)
$Label[8] = GuiCtrlCreateLabel("Spy Cleaner Gold", 270, 90, 100, 40)
$Label[9] = GuiCtrlCreateLabel("Spyware Blaster 3.3", 270, 130, 100, 40)
$Label[10] = GuiCtrlCreateLabel("MS AntiSpyware", 270, 170, 100, 40)
$Label[11] = GuiCtrlCreateLabel("PestPatrol 5*", 270, 210, 100, 40)
$Label[12] = GuiCtrlCreateLabel("AVG 7.0*", 270, 250, 100, 40)
$Label_39 = GuiCtrlCreateLabel("Items with * cannot be installed together with the item across from it.", 5, 280, 118, 40)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        case $msg = $Button_13
          for $i = 1 to $CheckBox[0]
              If (GUICtrlRead($CheckBox[$i]) == $GUI_CHECKED) Then MsgBox(0,"test",GUICtrlRead($Label[$i]) & " Selected")
            Next
      Case Else
  ;;;
    EndSelect
WEnd
Exit

Edit: added the top part for you this is a working script,

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Hmm, well the first one as far as I can tell just starts the install as soon as the box is checked. I was wanting something to collect all the checkboxes after the user clicks the install button at the bottom.

The second code listed has an error of :

Case $msg = $GUI_EVENT_CLOSE

Error : Variable used without being declared.

Share this post


Link to post
Share on other sites

just add this to the top, i was only showing you what changed to make it work.

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Spyware/Antivirus Quick Installer", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Hmm, well the first one as far as I can tell just starts the install as soon as the box is checked.

<{POST_SNAPBACK}>

Nope... only when the button is clicked.. :)

Case $msg = $Button_13
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ahh I see that now, sorry :)

I added your part to mine and get an error :

Line 79

Case Else

Error: "Case" Statement with no matching "select" statement.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

if want cut the code some you create an ini file and read it in, for example:

installer.ini

[Icons]
Icon=AAW.ico,Icon1
Icon=SB13.ico,Icon2
Icon=SSP.ico,Icon3
Icon=SSWEEP.ico,Icon4
Icon=PP4.ico,Icon5
Icon=EZAV.ico,Icon6
Icon=CS.ico,Icon7
Icon=SCG.ico,Icon8
Icon=SWB33.ico,Icon9
Icon=MSAS.ico,Icon10
Icon=PP5.ico,Icon11
Icon=AVG7.ico,Icon12

[Titles]
AdAware SE 1.05=install program for AdAware
Spybot 1.3=install program for Spybot 
SpySubtract Pro=install program for SpySubtract Pro
SpySweeper=install program for SpySweeper
PestPatrol 4*=install program for PestPatrol 4*
Etrust 2005*=install program for Etrust 2005*
CounterSpy=install program for CounterSpy
Spy Cleaner Gold=install program for Spy Cleaner Gold
Spyware Blaster 3.3=install program for Spyware Blaster
MS AntiSpyware=install program for MS AntiSpyware
PestPatrol 5*=install program for PestPatrol 5*
AVG 7.0*=install program for AVG 7.0*

then the following code would create your screen for you.

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Spyware/Antivirus Quick Installer", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

Dim $Icon[1],$Checkbox[1],$Label[1],$Installers[1]

Local $ARRAY, $I, $T_STR, $X = 60, $Y = 40
$ARRAY = IniReadSection(@ScriptDir & "\installer.ini", "Icons")
If @error Then
;MsgBox(4096, "", "Error occured, probably no INI file.")
Else
    ReDim $Icon[$ARRAY[0][0] + 1]
    $Icon[0] = $ARRAY[0][0]
    For $I = 1 To $ARRAY[0][0]
        $T_STR = StringSplit($ARRAY[$I][1],",")
        $Icon[$I] = GuiCtrlCreateIcon($T_STR[1], $T_STR[1], $X, $Y, 32, 32)
        $Y = $Y + 40
        If($I == $ARRAY[0][0] /2) Then 
            $X = 230
            $Y = 40
        EndIf
    Next
EndIf

$Label1 = GuiCtrlCreateLabel("Choose Which Programs to Install", 110, 10, 180, 20)

$ARRAY = 0
$ARRAY = IniReadSection(@ScriptDir & "\installer.ini", "Titles")
If @error Then
;MsgBox(4096, "", "Error occured, probably no INI file.")
Else
    $X = 100
    $Y = 50
    ReDim $Checkbox[$ARRAY[0][0] + 1]
    ReDim $Label[$ARRAY[0][0] + 1]
    ReDim $Installers[$ARRAY[0][0] + 1]
    $Checkbox[0] = $ARRAY[0][0]
    $Label[0] = $ARRAY[0][0]
    $Installers[0] = $ARRAY[0][0]
    For $I = 1 To $ARRAY[0][0]
        $Checkbox[$I] = GuiCtrlCreateCheckbox("Checkbox" & $I, $X - 55, $Y, 10, 20)
        $Label[$I] = GuiCtrlCreateLabel($ARRAY[$I][0], $X, $Y, 100, 40)
        $Installers[$I] = $ARRAY[$I][1]
        $Y = $Y + 40
        If($I == $ARRAY[0][0] /2) Then 
            $X = 270
            $Y = 50
        EndIf
    Next
EndIf

$Label_39 = GuiCtrlCreateLabel("Items with * cannot be installed together with the item across from it.", 5, 280, 118, 40)


$Button_13 = GuiCtrlCreateButton("Install Selected", 140, 290, 100, 20)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        case $msg = $Button_13
          for $i = 1 to $CheckBox[0]
              If (GUICtrlRead($CheckBox[$i]) == $GUI_CHECKED) Then MsgBox(0,"test",$Installers[$i] & " Selected")
            Next
      Case Else
   ;;;
    EndSelect
WEnd
Exit
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Ahh I see that now, sorry :)

I added your part to mine and get an error :

Line 79

Case Else

Error: "Case" Statement with no matching "select" statement.

<{POST_SNAPBACK}>

correct... you need to put a real statement after each the THEN:

If GUICtrlRead($Checkbox_14) = $GUI_CHECKED Then; run install

or change it to :

If GUICtrlRead($Checkbox_14) = $GUI_CHECKED Then; run install
EndIF

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Sorry again, I told you I wasn't very good at this. Now I've updated the code to reflect the program to run, but nothing ever happens. No matter which checkboxes are checked, nothing ever happens. Any ideas?

By the way, thanks so much, this is EXACTLY what I was looking for, if I can just get it to start the installations I'll be home free. I appreciate all the help more than you can imagine.

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Spyware/Antivirus Quick Installer", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + 

$WS_CLIPSIBLINGS)

$Icon_1 = GuiCtrlCreateIcon("AAW.ico", "Icon1", 60, 40, 32, 32)
$Icon_2 = GuiCtrlCreateIcon("SB13.ico", "Icon2", 60, 80, 32, 32)
$Icon_3 = GuiCtrlCreateIcon("SSP.ico", "Icon3", 60, 120, 32, 32)
$Icon_4 = GuiCtrlCreateIcon("SSWEEP.ico", "Icon4", 60, 160, 32, 32)
$Icon_5 = GuiCtrlCreateIcon("PP4.ico", "Icon5", 60, 200, 32, 32)
$Icon_6 = GuiCtrlCreateIcon("EZAV.ico", "Icon6", 60, 240, 32, 32)
$Icon_7 = GuiCtrlCreateIcon("CS.ico", "Icon7", 230, 40, 32, 32)
$Icon_8 = GuiCtrlCreateIcon("SCG.ico", "Icon8", 230, 80, 32, 32)
$Icon_9 = GuiCtrlCreateIcon("SWB33.ico", "Icon9", 230, 120, 32, 32)
$Icon_10 = GuiCtrlCreateIcon("MSAS.ico", "Icon10", 230, 160, 32, 32)
$Icon_11 = GuiCtrlCreateIcon("PP5.ico", "Icon11", 230, 200, 32, 32)
$Icon_12 = GuiCtrlCreateIcon("AVG7.ico", "Icon12", 230, 240, 32, 32)
$Button_13 = GuiCtrlCreateButton("Install Selected", 140, 290, 100, 20)
$Checkbox_14 = GuiCtrlCreateCheckbox("Checkbox14", 45, 50, 10, 20)
$Checkbox_15 = GuiCtrlCreateCheckbox("Checkbox15", 45, 90, 10, 20)
$Checkbox_16 = GuiCtrlCreateCheckbox("Checkbox16", 45, 130, 10, 20)
$Checkbox_17 = GuiCtrlCreateCheckbox("Checkbox17", 45, 170, 10, 20)
$Checkbox_18 = GuiCtrlCreateCheckbox("Checkbox18", 45, 210, 10, 20)
$Checkbox_19 = GuiCtrlCreateCheckbox("Checkbox19", 45, 250, 10, 20)
$Checkbox_20 = GuiCtrlCreateCheckbox("Checkbox20", 215, 50, 10, 20)
$Checkbox_21 = GuiCtrlCreateCheckbox("Checkbox21", 215, 90, 10, 20)
$Checkbox_22 = GuiCtrlCreateCheckbox("Checkbox22", 215, 130, 10, 20)
$Checkbox_23 = GuiCtrlCreateCheckbox("Checkbox23", 215, 170, 10, 20)
$Checkbox_24 = GuiCtrlCreateCheckbox("Checkbox24", 215, 210, 10, 20)
$Checkbox_25 = GuiCtrlCreateCheckbox("Checkbox25", 215, 250, 10, 20)
$Label_26 = GuiCtrlCreateLabel("Choose Which Programs to Install", 110, 10, 180, 20)
$Label_27 = GuiCtrlCreateLabel("AdAware SE 1.05", 100, 50, 100, 40)
$Label_28 = GuiCtrlCreateLabel("Spybot 1.3", 100, 90, 100, 40)
$Label_29 = GuiCtrlCreateLabel("SpySubtract Pro", 100, 130, 100, 40)
$Label_30 = GuiCtrlCreateLabel("SpySweeper", 100, 170, 100, 40)
$Label_31 = GuiCtrlCreateLabel("PestPatrol 4*", 100, 210, 100, 40)
$Label_32 = GuiCtrlCreateLabel("Etrust 2005*", 100, 250, 100, 40)
$Label_33 = GuiCtrlCreateLabel("CounterSpy", 270, 50, 100, 40)
$Label_34 = GuiCtrlCreateLabel("Spy Cleaner Gold", 270, 90, 100, 40)
$Label_35 = GuiCtrlCreateLabel("Spyware Blaster 3.3", 270, 130, 100, 40)
$Label_36 = GuiCtrlCreateLabel("MS AntiSpyware", 270, 170, 100, 40)
$Label_37 = GuiCtrlCreateLabel("PestPatrol 5*", 270, 210, 100, 40)
$Label_38 = GuiCtrlCreateLabel("AVG 7.0*", 270, 250, 100, 40)
$Label_39 = GuiCtrlCreateLabel("Items with * cannot be installed together with the item across from it.", 5, 280, 118, 40)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button_13
        If GUICtrlRead($Checkbox_14) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\aaw\aaw.exe")
    If GUICtrlRead($Checkbox_15) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\sbsd13\sbsd13.exe")
    If GUICtrlRead($Checkbox_16) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\ssp\ssp.exe")
        If GUICtrlRead($Checkbox_17) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\ssweep\ssweep.exe")
    If GUICtrlRead($Checkbox_18) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\PP\4.0\PP4.exe")
        If GUICtrlRead($Checkbox_19) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\etrust\etrust.exe")
    If GUICtrlRead($Checkbox_20) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\cs\cs.exe")
        If GUICtrlRead($Checkbox_21) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\scg\scg.exe")
    If GUICtrlRead($Checkbox_22) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\swb33\swb33.exe")
        If GUICtrlRead($Checkbox_23) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\msas\msas.exe")
    If GUICtrlRead($Checkbox_24) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\PP\5.0\PP5.exe")
        If GUICtrlRead($Checkbox_25) = $GUI_CHECKED Then run ("C:\Documents and Settings\Owner\Desktop\Menu\avg7\avg7.exe")
        ExitLoop
    Case Else
  ;;;
    EndSelect
WEnd


;GuiSetState()
;While 1
;    $msg = GuiGetMsg()
;    Select
;    Case $msg = $GUI_EVENT_CLOSE
;        ExitLoop
;    Case Else
;    ;;;
;    EndSelect
;WEnd
Exit
Edited by jowaju

Share this post


Link to post
Share on other sites

I'm guessing from the code that the install software is in the menu folder on thier desktop.

so here goes.

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("Spyware/Antivirus Quick Installer", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

Dim $Icon[13],$Checkbox[13],$Label[13],$Installs[13]
$Icon[0] = 12
$Checkbox[0] = 12
$Label[0] = 12
$Installs[0] = 12

$Installs[1] = @DesktopDir & "\Menu\aaw\aaw.exe"
$Installs[2] = @DesktopDir & "\Menu\sbsd13\sbsd13.exe"
$Installs[3] = @DesktopDir & "\Menu\ssp\ssp.exe"
$Installs[4] = @DesktopDir & "\Menu\ssweep\ssweep.exe"
$Installs[5] = @DesktopDir & "\Menu\PP\4.0\PP4.exe"
$Installs[6] = @DesktopDir & "\Menu\etrust\etrust.exe"
$Installs[7] = @DesktopDir & "\Menu\cs\cs.exe"
$Installs[8] = @DesktopDir & "\Menu\scg\scg.exe"
$Installs[9] = @DesktopDir & "\Menu\swb33\swb33.exe"
$Installs[10] = @DesktopDir & "\Menu\msas\msas.exe"
$Installs[11] = @DesktopDir & "\Menu\PP\5.0\PP5.exe"
$Installs[12] = @DesktopDir & "\Menu\avg7\avg7.exe"

$Icon[1] = GuiCtrlCreateIcon("AAW.ico", "Icon1", 60, 40, 32, 32)
$Icon[2] = GuiCtrlCreateIcon("SB13.ico", "Icon2", 60, 80, 32, 32)
$Icon[3] = GuiCtrlCreateIcon("SSP.ico", "Icon3", 60, 120, 32, 32)
$Icon[4] = GuiCtrlCreateIcon("SSWEEP.ico", "Icon4", 60, 160, 32, 32)
$Icon[5] = GuiCtrlCreateIcon("PP4.ico", "Icon5", 60, 200, 32, 32)
$Icon[6] = GuiCtrlCreateIcon("EZAV.ico", "Icon6", 60, 240, 32, 32)
$Icon[7] = GuiCtrlCreateIcon("CS.ico", "Icon7", 230, 40, 32, 32)
$Icon[8] = GuiCtrlCreateIcon("SCG.ico", "Icon8", 230, 80, 32, 32)
$Icon[9] = GuiCtrlCreateIcon("SWB33.ico", "Icon9", 230, 120, 32, 32)
$Icon[10] = GuiCtrlCreateIcon("MSAS.ico", "Icon10", 230, 160, 32, 32)
$Icon[11] = GuiCtrlCreateIcon("PP5.ico", "Icon11", 230, 200, 32, 32)
$Icon[12] = GuiCtrlCreateIcon("AVG7.ico", "Icon12", 230, 240, 32, 32)

$Button_13 = GuiCtrlCreateButton("Install Selected", 140, 290, 100, 20)
$Checkbox[1] = GuiCtrlCreateCheckbox("Checkbox14", 45, 50, 10, 20)
$Checkbox[2] = GuiCtrlCreateCheckbox("Checkbox15", 45, 90, 10, 20)
$Checkbox[3] = GuiCtrlCreateCheckbox("Checkbox16", 45, 130, 10, 20)
$Checkbox[4] = GuiCtrlCreateCheckbox("Checkbox17", 45, 170, 10, 20)
$Checkbox[5] = GuiCtrlCreateCheckbox("Checkbox18", 45, 210, 10, 20)
$Checkbox[6] = GuiCtrlCreateCheckbox("Checkbox19", 45, 250, 10, 20)
$Checkbox[7] = GuiCtrlCreateCheckbox("Checkbox20", 215, 50, 10, 20)
$Checkbox[8] = GuiCtrlCreateCheckbox("Checkbox21", 215, 90, 10, 20)
$Checkbox[9] = GuiCtrlCreateCheckbox("Checkbox22", 215, 130, 10, 20)
$Checkbox[10] = GuiCtrlCreateCheckbox("Checkbox23", 215, 170, 10, 20)
$Checkbox[11] = GuiCtrlCreateCheckbox("Checkbox24", 215, 210, 10, 20)
$Checkbox[12] = GuiCtrlCreateCheckbox("Checkbox25", 215, 250, 10, 20)
$Label1 = GuiCtrlCreateLabel("Choose Which Programs to Install", 110, 10, 180, 20)
$Label[1] = GuiCtrlCreateLabel("AdAware SE 1.05", 100, 50, 100, 40)
$Label[2] = GuiCtrlCreateLabel("Spybot 1.3", 100, 90, 100, 40)
$Label[3] = GuiCtrlCreateLabel("SpySubtract Pro", 100, 130, 100, 40)
$Label[4] = GuiCtrlCreateLabel("SpySweeper", 100, 170, 100, 40)
$Label[5] = GuiCtrlCreateLabel("PestPatrol 4*", 100, 210, 100, 40)
$Label[6] = GuiCtrlCreateLabel("Etrust 2005*", 100, 250, 100, 40)
$Label[7] = GuiCtrlCreateLabel("CounterSpy", 270, 50, 100, 40)
$Label[8] = GuiCtrlCreateLabel("Spy Cleaner Gold", 270, 90, 100, 40)
$Label[9] = GuiCtrlCreateLabel("Spyware Blaster 3.3", 270, 130, 100, 40)
$Label[10] = GuiCtrlCreateLabel("MS AntiSpyware", 270, 170, 100, 40)
$Label[11] = GuiCtrlCreateLabel("PestPatrol 5*", 270, 210, 100, 40)
$Label[12] = GuiCtrlCreateLabel("AVG 7.0*", 270, 250, 100, 40)
$Label_39 = GuiCtrlCreateLabel("Items with * cannot be installed together with the item across from it.", 5, 280, 118, 40)
GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        case $msg = $Button_13
          for $i = 1 to $CheckBox[0]
              If (GUICtrlRead($CheckBox[$i]) == $GUI_CHECKED) Then RunWait($Installs[$i])
            Next
      Case Else
 ;;;
    EndSelect
WEnd
Exit

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Thanks so much, that finally did it, I think I can work out the rest of it on my own. I really appreciate your help.

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  
Followers 0