johnmcloud Posted February 1, 2012 Share Posted February 1, 2012 (edited) Hi guys, i have ther two script made with a help of some forumer The GUI $GUI = GUICreate("Test", 545, 267, -1, -1) $ProgressBar = GUICtrlCreateProgress(16, 226, 512, 25) $ProgressLabel = GUICtrlCreateLabel("Status: Ready", 16, 211, 511, 17) The working script: Func _FileDelete() For $I = 1 To $List[0] $ProgressSet = Int($I / ($List[0]) * 100) GUICtrlSetData($ProgressBar, $ProgressSet) FileDelete($List[$I]) GUICtrlSetData($ProgressLabel, "Status: Files deleting... " & $List[0] - $I) Next GUICtrlSetData($ProgressLabel, "Status: Ready") GUICtrlSetData($ProgressBar, 0) EndFunc The script not working Func _FileMove() $Destination = FileSelectFolder("Select folder...", "", 0, @WorkingDir) If @error Then MsgBox(16, "Error", "No folder") Return EndIf For $I = 1 To $List[0] $ProgressSet = Int($I / ($List[0]) * 100) FileMove($List[$I],$Destination) GUICtrlSetData($ProgressLabel, "Status: Files moving... " & $List[0] - $I) Next GUICtrlSetData($ProgressLabel, "Status: Ready") GUICtrlSetData($ProgressBar, 0) EndFunc The first work the progressbar an the label update with decreasing number. The second only decreasing number, progressbar don't working I don't understand why, FileDelete is not comparable to FileMove? If i move or delete from the array file is not the same for the script? Thanks for support Edited February 1, 2012 by johnmcloud Link to comment Share on other sites More sharing options...
hannes08 Posted February 1, 2012 Share Posted February 1, 2012 You're missing GUICtrlSetData($ProgressBar, $ProgressSet) In the second script. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
johnmcloud Posted February 1, 2012 Author Share Posted February 1, 2012 What? Sorry for this stupid thing, i'm looking it many time before post a thread... Thanks Hanness Link to comment Share on other sites More sharing options...
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