Tsunami Posted January 14, 2008 Share Posted January 14, 2008 Hello all, I have a little problem, where I think you could help me out. I have a GUI script with 2 Progress bars. When a special process is choosen, a function runs an displays a Progress bar in the GUI. The time for the progress bars is fix (15 minutes, 20 Minutes, ...) My script runs well, but when the progress bar is displayed, no other funktions from the GUI can be used, I cant`t even EXIT the script. Ok - this is for the sleep commands. I know CODEFunc Process($swait, $sInput1) ... .... ..... If Not StringInStr($sHTML, $Phrase) Then For $i = 0 to 100 GUICtrlSetData ($Progress1,$i) If GUIGetMsg() = $cancelbutton Then Set_Exit() sleep($swait) Next sleep(500) GUICtrlSetData ($Progress1,"0") EndIf EndFunc For testing I added a line for exiting the script: CODEIf Not StringInStr($sHTML, $Phrase) Then For $i = 0 to 100 GUICtrlSetData ($Progress1,$i) If GUIGetMsg() = $cancelbutton Then Set_Exit() sleep($swait) Next sleep(500) GUICtrlSetData ($Progress1,"0") EndIf So now I can Exit the script faster, but still have to wait far to long. And still other Buttons wont work. I thought of using a func only for the progress and work with "AdlibEnable", "_TimeToTicks" and "TicksToTime". But I hope someone has a smart Idea for me Link to comment Share on other sites More sharing options...
Tsunami Posted January 14, 2008 Author Share Posted January 14, 2008 Hello all,I have a little problem, where I think you could help me out.I have a GUI script with 2 Progress bars. When a special process is choosen, a function runs an displays a Progress bar in the GUI.The time for the progress bars is fix (15 minutes, 20 Minutes, ...)My script runs well, but when the progress bar is displayed, no other funktions from the GUI can be used, I cant`t even EXIT the script.Ok - this is for the sleep commands. I knowCODEFunc Process($swait, $sInput1)............If Not StringInStr($sHTML, $Phrase) Then For $i = 0 to 100 GUICtrlSetData ($Progress1,$i) sleep($swait) Next sleep(500) GUICtrlSetData ($Progress1,"0")EndIf EndFuncFor testing I added a line for exiting the script:CODEIf Not StringInStr($sHTML, $Phrase) Then For $i = 0 to 100 GUICtrlSetData ($Progress1,$i) If GUIGetMsg() = $cancelbutton Then Set_Exit() sleep($swait) Next sleep(500) GUICtrlSetData ($Progress1,"0")EndIf So now I can Exit the script faster, but still have to wait far to long. And still other Buttons wont work. I thought of using a func only for the progress and work with "AdlibEnable", "_TimeToTicks" and "TicksToTime".But I hope someone has a smart Idea for me Uups, sorry.The line "If GUIGetMsg() = $cancelbutton Then Set_Exit()" was added in the second try and should not be seen in the first sample.Might be the "cut-and-paste-devil" has done this..... 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