Can you share a working script? I am confused by what you mean.
Where are the numbers coming from?
Can numbers increase?
You want to be able to check different numbers independently?
I would run commands on a
SetTimer. Maybe a different timer for each number you want to check. I would use these if statements:
Code: Select all
SetTimer, mytimerA, 500
mytimerA:
currentNumberA:=WhereverThatNumberComesFrom
If (currentNumberA=previousNumberA)
return ; don't do anything else, nothing has changed
else if (currentNumberA>previousNumberA)
previousNumberA:=currentNumberA ; the number increased, so now we update our historical number to reflect that
else ; the number decreased
{
previousNumberA:=currentNumberA ; we update our historical number
SoundBeep
SetTimer, mytimerA, Off ; assuming you want to stop checking after it soundbeeps
}
return
As previousNumberA should start out blank, the first time the timer executes its subroutine, it should evaluate
else if (currentNumberA>previousNumberA) as true, and then any successive time through it can be any of the three If statements.