Sign in to follow this  
Followers 0
skippynz

smart progress bar

2 posts in this topic

Does anyone know if you can create a smart progress bar - one that will basically check how many lines are in the script, then as each line progresses it will calculate the percentage

ive got one that will run via adlib, but its not gunna work on faster machines properly...

any ideas ?

AdlibEnable("AppProgress",500)
ProgressOn("File Install Progress", "", "0 percent")

rest of script in here.

Func AppProgress()
    ProgressSet( $i , $i & " percent")
    $i = $i + 5
EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Does anyone know if you can create a smart progress bar - one that will basically check how many lines are in the script, then as each line progresses it will calculate the percentage

ive got one that will run via adlib, but its not gunna work on faster machines properly...

any ideas ?

AdlibEnable("AppProgress",500)
ProgressOn("File Install Progress", "", "0 percent")

rest of script in here.

Func AppProgress()
    ProgressSet( $i , $i & " percent")
    $i = $i + 5
EndFunc
i just did one.... and ended up like this

$progress = GUICtrlCreateProgress(20, 75, 200, 20, $PBS_SMOOTH)
    GUICtrlSetState( -1, $GUI_SHOW)
    GUICtrlSetData($label_1, "Now installing " & $Name)
    GUICtrlSetData($label_2, "Loading installer...")
    Sleep($time)
    GUICtrlSetData($progress, 10)
    Sleep($time)
    GUICtrlSetData($label_2, "Checking for Toy BOX Folder...")
    GUICtrlSetData($progress, 20)
    Sleep($time)
    GUICtrlSetData($progress, 30)
; check if folder exists
    DirGetSize($Location)
    If @error = 1 Then
        DirCreate($Location)
    EndIf
    GUICtrlSetData($progress, 40)
    Sleep($time)
    GUICtrlSetData($label_2, "Checking for previous install...")
    GUICtrlSetData($progress, 50)
    Sleep($time)
    If FileExists($Location & $Name) Then
; bla..... bla..... bla

8)

Edited by Valuater

NEWHeader1.png

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