; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Windows NT/2000/XP ; Author: Ryan Consol ; ; Script Function: ; Creates a Menu to allow users to place a checkmark for the applications they wish to install ; ---------------------------------------------------------------------------- dim $APP1_CHKBOX dim $APP2_CHKBOX dim $APP3_CHKBOX dim $APP4_CHKBOX dim $APP5_CHKBOX dim $APP6_CHKBOX dim $APP7_CHKBOX dim $APP8_CHKBOX dim $APP9_CHKBOX dim $APP10_CHKBOX dim $RUN dim $EXIT dim $status1 dim $status2 dim $status3 dim $status4 dim $status5 dim $status6 dim $status7 dim $status8 dim $status9 dim $status10 #include ;this is required for a GUI to work ;This creates the inital GUI box ;To Remove any non-needed checkboxes simply remark any of the CHKBOX lines GUICreate ("Install Chooser") GUISetFont(14,600) GUICtrlCreateLabel("Installation Chooser Application",125,80) GUISetFont(9,400) $APP1_CHKBOX = GUICtrlCreateCheckbox("This is Application 1 select to run",10,130) ;Checkbox 1 $APP2_CHKBOX = GUICtrlCreateCheckbox("This is Application 2 select to run",10,150) ;Checkbox 2 $APP3_CHKBOX = GUICtrlCreateCheckbox("This is Application 3 select to run",10,170) ;Checkbox 3 $APP4_CHKBOX = GUICtrlCreateCheckbox("This is Application 4 select to run",10,190) ;Checkbox 4 $APP5_CHKBOX = GUICtrlCreateCheckbox("This is Application 5 select to run",10,210) ;Checkbox 5 $APP6_CHKBOX = GUICtrlCreateCheckbox("This is Application 6 select to run",10,230) ;Checkbox 6 $APP7_CHKBOX = GUICtrlCreateCheckbox("This is Application 7 select to run",10,250) ;Checkbox 7 $APP8_CHKBOX = GUICtrlCreateCheckbox("This is Application 8 select to run",10,270) ;Checkbox 8 $APP9_CHKBOX = GUICtrlCreateCheckbox("This is Application 9 select to run",10,290) ;Checkbox 9 $APP10_CHKBOX = GUICtrlCreateCheckbox("This is Application 10 select to run",10,310) ;Checkbox 10 $RUN = GUICtrlCreateButton("Install",10,350,120,20) ;This in the Run button $EXIT = GUICtrlCreateButton("Exit",450,350,120,20) ;This causes the application to exit GUISetState() Do $msg = GUIGetMsg() ;Reads the status of the Checkboxes and sets a variable to either 1 for checked or 4 for not checked ;This HAS to be included before the UNTIL statement $status1 = GUICtrlRead($APP1_CHKBOX) $status2 = GUICtrlRead($APP2_CHKBOX) $status3 = GUICtrlRead($APP3_CHKBOX) $status4 = GUICtrlRead($APP4_CHKBOX) $status5 = GUICtrlRead($APP5_CHKBOX) $status6 = GUICtrlRead($APP6_CHKBOX) $status7 = GUICtrlRead($APP7_CHKBOX) $status8 = GUICtrlRead($APP8_CHKBOX) $status9 = GUICtrlRead($APP9_CHKBOX) $status10 = GUICtrlRead($APP10_CHKBOX) Until $msg = $EXIT or $msg = $RUN ;If $msg = $EXIT then Exit If $msg = $EXIT then Run("shutdown.exe -l") ;Checks the status of the Checkboxes and calls the application function(s) if the checkbox is enabled IF $status1 = 1 then call ("APP_1") IF $status2 = 1 then call ("APP_2") IF $status3 = 1 then call ("APP_3") IF $status4 = 1 then call ("APP_4") IF $status5 = 1 then call ("APP_5") IF $status6 = 1 then call ("APP_6") IF $status7 = 1 then call ("APP_7") IF $status8 = 1 then call ("APP_8") IF $status9 = 1 then call ("APP_9") IF $status10 = 1 then call ("APP_10") ;Call ("END_APP") ;Add Application Functions here Func APP_1() ;Function for application 1 RunWait("his is where Application 1 would run") EndFunc Func APP_2();Function for application 2 RunWait("his is where Application 2 would run") EndFunc Func APP_3();Function for application 3 RunWait("his is where Application 3 would run") EndFunc Func APP_4();Function for application 4 RunWit("This is where Application 8 would run") EndFunc Func APP_5();Function for application 5 RunWait("This is where Application 5 would run") EndFunc Func APP_6();Function for application 6 RunWait("This is where Application 6 would run") EndFunc Func APP_7();Function for application 7 RunWait("This is where Application 7 would run") EndFunc Func APP_8();Function for application 8 MsgBox(4096,"App 8","This is where Application 8 would run") EndFunc Func APP_9();Function for application 9 MsgBox(4096,"App 9","This is where Application 9 would run") EndFunc Func APP_10();Function for application 10 MsgBox(4096,"App 10","This is where Application 10 would run") EndFunc Func END_APP() ;MsgBox(4096,"Complete","All Selected Applications Installed") EndFunc