Sign in to follow this  
Followers 0
Sublime

Priorities

3 posts in this topic

How do you setup priorities within a set of checkboxes so if one is checked and so is the second one it would start the second one first than the first one.

I am creating an application installer and would like to keep the list of applications alphbetized yet some need to start b4 others which kinda creates this delema. So far it works perfectly and no it is not finished this was just a thought that had crossed my mind for when I had finally finished it because certain programs require a restart in order to work. EX Acrobat 6.0 is one of them. Also how would I make it so it would start back up where it had left off after logging back in?

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 <GUIConstants.au3> 

GUICreate ("Application Installer",300,330)
GUISetFont(14,600)
GUICtrlCreateLabel("Application Installer",10,20)
GUISetFont(9,400)
$APP1_CHKBOX = GUICtrlCreateCheckbox("Adobe 5.1",10,70)
$APP2_CHKBOX = GUICtrlCreateCheckbox("Adobe 6.0",10,90)
$APP3_CHKBOX = GUICtrlCreateCheckbox("Adobe 7.0",10,110)
$APP4_CHKBOX = GUICtrlCreateCheckbox("WinZip 10.0",10,130)
$APP5_CHKBOX = GUICtrlCreateCheckbox("QuickTime 7.0.4",10,150)
$APP6_CHKBOX = GUICtrlCreateCheckbox("Application 6",10,170)
$APP7_CHKBOX = GUICtrlCreateCheckbox("Application 7",10,190)
$APP8_CHKBOX = GUICtrlCreateCheckbox("Application 8",10,210)
$APP9_CHKBOX = GUICtrlCreateCheckbox("Application 9",10,230)
$APP10_CHKBOX = GUICtrlCreateCheckbox("Application 10",10,250)
$RUN = GUICtrlCreateButton("Install",10,290,120,20)
$EXIT = GUICtrlCreateButton("Exit",170,290,120,20)
GUISetState()


Do
    $msg = GUIGetMsg()

$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 $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")

Func APP_1()
    SplashTextOn("Adobe 5.1 Install", "Installing Adobe 5.1", "300", "50")
    Sleep(3000)
    SplashOff()
    Run(".\tools\Acrobat Reader\Adobe 5.1\AR 5.1 Auto Installer.exe")
    WinWaitClose ( 'Information', 'Thank you for choosing Acrobat Reader!' )
EndFunc

Func APP_2()
    SplashTextOn("Adobe 6.0 Install", "Installing Adobe 6.0", "300", "50")
    Sleep(3000)
    SplashOff()
    Run("")
    WinWaitClose("")
EndFunc


Func APP_3()
    SplashTextOn("Adobe 7.0 Install", "Installing Adobe 7.0", "300", "50")
    Sleep(3000)
    SplashOff()
    Run("")
    WinWaitClose("")
EndFunc


Func APP_4()
    SplashTextOn("WinZip 10.0 Install", "Installing WinZip 10.0", "300", "50")
    Sleep(3000)
    SplashOff()
    Run(".\tools\WinZip\WZ 10 Auto Install.exe")
    WinWaitClose( 'WinZip (Evaluation Version)' )
EndFunc


Func APP_5()
    SplashTextOn("QuickTime 7.0.4 Install", "Installing QuickTime 7.0.4", "300", "50")
    Sleep(3000)
    SplashOff()
    Run(".\tools\QuickTime\QT 7.0.4 Auto Install.exe")
    WinWaitClose("")
EndFunc

Func APP_6()
    SplashTextOn(" Install", "Installing ", "300", "50")
    Sleep(3000)
    SplashOff()
    Run("")
    WinWaitClose("")
EndFunc

Func APP_7()
    SplashTextOn(" Install", "Installing ", "300", "50")
    Sleep(3000)
    SplashOff()
    Run("")
    WinWaitClose("")
EndFunc

Func APP_8()
    SplashTextOn(" Install", "Installing ", "300", "50")
    Sleep(3000)
    SplashOff()
    Run("")
    WinWaitClose("")
EndFunc

Func APP_9()
    SplashTextOn(" Install", "Installing ", "300", "50")
    Sleep(3000)
    SplashOff()
    Run("")
    WinWaitClose("")
EndFunc

Func APP_10()
    SplashTextOn(" Install", "Installing ", "300", "50")
    Sleep(3000)
    SplashOff()
    Run("")
    WinWaitClose("")
EndFunc

Func END_APP()
    MsgBox(4096,"Complete","All Selected Applications Installed")
EndFunc

Share this post


Link to post
Share on other sites



My suggestion on getting it to pick up where it left off is to when it runs a set of installs, put it in the registry to start, and also to use registry entries on its progress. This way it can keep track, and you can make it clean up behind itself after it is done.

The other problem with sorting, not sure on that one.

Share this post


Link to post
Share on other sites

Yea I been thinking about it and what seems to be the easy solution and simple is to have it create an array in an INI in the tempdir and than have it set 2 colums after the identifier the first being whether it was selectd or not ath the second being whether it has been run or not.

As for the priorities other than trying to make the call functions in a different order and franticly attempting to not get confused which is where and which is what I have no thoughts.

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