bobheart Posted May 27, 2004 Posted May 27, 2004 I can't seem to get the bar to work with the backup or restore . expandcollapse popup;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
Marc Posted May 27, 2004 Posted May 27, 2004 Using the current unstable 3.102, it works... 10,20,...done. Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL)
bobheart Posted May 27, 2004 Author Posted May 27, 2004 it runs bu it is running by its self not with the program ..
Marc Posted May 27, 2004 Posted May 27, 2004 Oh, I see 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)
SlimShady Posted May 27, 2004 Posted May 27, 2004 (edited) This is all I can make of it. I don't have another solution. expandcollapse popup;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 May 27, 2004 by SlimShady
bobheart Posted May 27, 2004 Author Posted May 27, 2004 Thank you for the help .. that seems to work .
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now