amanda089 Posted May 23, 2005 Posted May 23, 2005 With this code: for $i = 0 To 399 Select Case $i > 299 GUICtrlSetData ($Progress_1,(300 - $i)) $s = (300 - $i) Case $i > 199 GUICtrlSetData ($Progress_1,($i - 200)) $s = ($i - 200) Case $i > 99 GUICtrlSetData ($Progress_1,(100 - $i)) $s = (100 - $i) Case Else GUICtrlSetData ($Progress_1,$i) $s = $i EndSelect GUICtrlSetData ($Label_2, "$s = " & $s) Sleep(100) next the GUI ProgressBar goes up to 100, then goes blank... while the sample code from the help file increments and decrements... GUICtrlSetData ($Progress_1,(100 - $i)) is the same line from the help file, progressbar handle changed.
Ejoc Posted May 23, 2005 Posted May 23, 2005 for $i = 0 To 399 GUICtrlSetData ($Progress_1,Int(($i*100)/400)) $s = Int(($i*100)/400) GUICtrlSetData ($Label_2, "$s = " & $s) Sleep(100) next Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
scriptkitty Posted May 23, 2005 Posted May 23, 2005 your code for $i = 0 To 399 Select Case $i > 299 GUICtrlSetData ($Progress_1,100 -($i-300)) $s = (300 - $i) Case $i > 199 GUICtrlSetData ($Progress_1,($i - 200)) $s = ($i - 200) Case $i > 99 GUICtrlSetData ($Progress_1,100-($i-100)) $s = (100 - $i) Case Else GUICtrlSetData ($Progress_1,$i) $s = $i EndSelect GUICtrlSetData ($Label_2, "$s = " & $s) Sleep(100) ToolTip($i & @crlf & $s) next I think you meant to go up and then down? AutoIt3, the MACGYVER Pocket Knife for computers.
GaryFrost Posted May 23, 2005 Posted May 23, 2005 for $i = 0 To 399 GUICtrlSetData ($Progress_1,Int(($i*100)/400)) $s = Int(($i*100)/400) GUICtrlSetData ($Label_2, "$s = " & $s) Sleep(100) next for $i = 399 To 0 step -1 GUICtrlSetData ($Progress_1,Int(($i*100)/400)) $s = Int(($i*100)/400) GUICtrlSetData ($Label_2, "$s = " & $s) Sleep(100) next SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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