Sign in to follow this  
Followers 0
Tsunami

Progress bar blocks GUI

2 posts in this topic

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

CODE
Func 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:

CODE
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

So now I can Exit the script faster, but still have to wait far to long. And still other Buttons wont work. :P

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 :D

Share this post


Link to post
Share on other sites

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

CODE
Func 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

EndFunc

For testing I added a line for exiting the script:

CODE
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

So now I can Exit the script faster, but still have to wait far to long. And still other Buttons wont work. :P

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 :D

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..... ;)

Share this post


Link to post
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
Sign in to follow this  
Followers 0