Jump to content

Using sleep with a condtion


Cuervo
 Share

Recommended Posts

Hey all,

I've tried this and when it gets to a sleep statement with the lag in there is just hangs. Is it not possible to do this?

NVM - got it to work like this.

Global $Lag

$Lag = 200


$hSlider = GUICtrlCreateSlider(25, 110, 250, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
GUICtrlSetLimit(-1, 300, 100)
GUICtrlSetData($hSlider, $lag)
GUICtrlCreateLabel("Lag adj", 280, 110)

$lag = Int(GUICtrlRead($hSlider))
If $lag > 300 Or $lag < 100 Then
    $lag = 200
EndIf

Sleep(5000) ; this and the line below work
Sleep($Lag)

Sleep(5000 & $Lag) ; this did not work and where I was hanging
Edited by Cuervo

-Tim

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...