Sign in to follow this  
Followers 0
bobheart

Could someone help me with this .

8 posts in this topic

I can't seem to get the bar to work with the backup or restore .

;Generated with AutoBuilder 0.3

Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)

GuiCreate("Do a  backup", 243,201,10,10,0x04CF0000)
$pic_1 = GUISetControl("pic", "earth_bca3.gif", 20,20, 70,70)
$button_1 = GUISetControl("button", "Backup", 130,20, 90,30)
$button_2 = GUISetControl("button", "Restore", 130,80, 90,30)
$button_3 = GUISetControl("button", "Help", 130,140, 90,30)

GuiShow()

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
    Case $msg = -3
  Exit
    Case $msg = $pic_1
    ;;;
    Case $msg = $button_1
    DirCreate("C:\VAULT")
    ProgressOn("Progress Meter", "Now making your backup", "0 percent")
For $i = 10 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()
    Run("backup.bat", "", @SW_MINIMIZE )
    ;;;
    Case $msg = $button_2
    ProgressOn("Progress Meter", "Now restoring your backup", "0 percent")
For $i = 10 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()
    Run("restore.bat", "", @SW_MINIMIZE )
    ;;;
    Case $msg = $button_3
    
    ;;;
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites



Using the current unstable 3.102, it works...

10,20,...done. :D


It's my job to comfort the disturbed and to disturb the comfortable.

Share this post


Link to post
Share on other sites

it runs bu it is running by its self not with the program ..

Share this post


Link to post
Share on other sites

Oh, I see :D

Well, currently your script loops the progressbar up to 100%, sets the text to done and after that it invokes the according batch file.

Shouldn't you first invoke the batch and then do the progress bar?


It's my job to comfort the disturbed and to disturb the comfortable.

Share this post


Link to post
Share on other sites

heh heh thats what I need help with ..

Share this post


Link to post
Share on other sites

Bump dee bump bump dee bump .

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

This is all I can make of it. I don't have another solution.

;Generated with AutoBuilder 0.3

Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)

GuiCreate("Do a  backup", 243,201,10,10,0x04CF0000)
$pic_1 = GUISetControl("pic", "earth_bca3.gif", 20,20, 70,70)
$button_1 = GUISetControl("button", "Backup", 130,20, 90,30)
$button_2 = GUISetControl("button", "Restore", 130,80, 90,30)
$button_3 = GUISetControl("button", "Help", 130,140, 90,30)

GuiShow()

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
    Case $msg = -3
  Exit
    Case $msg = $pic_1
;;;
    Case $msg = $button_1
    DirCreate("C:\VAULT")
    ProgressOn("Progress Meter", "Now making your backup", "0 percent")
    Run("backup.bat", "", @SW_MINIMIZE )
For $i = 10 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()
;;;
    Case $msg = $button_2
    ProgressOn("Progress Meter", "Now restoring your backup", "0 percent")
    Run("restore.bat", "", @SW_MINIMIZE )
For $i = 10 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()
;;;
    Case $msg = $button_3
    
;;;
    EndSelect
WEnd
Exit
Edited by SlimShady

Share this post


Link to post
Share on other sites

Thank you for the help .. that seems to work .

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