Jump to content

Could someone help me with this .


Recommended Posts

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
Link to comment
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?

Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...