I want to trigger different actions depending on the time elapsed.
Using Case x works, but using Case < x or Case is < x doesn’t.
Example:
Select Case TimeMs
Case < 500
…
Case < 1500
…
case else
…
end select
What am I doing wrong?
I want to trigger different actions depending on the time elapsed.
Using Case x works, but using Case < x or Case is < x doesn’t.
Example:
Select Case TimeMs
Case < 500
…
Case < 1500
…
case else
…
end select
What am I doing wrong?
AppStudio’s BASIC Select statement translates to JavaScript case statement, which does not support ranges. Here’s what you could do instead (air code):
If timeMS < 500 Then
duration = "low"
Else if timeMS < 1500 Then
duration = "medium"
End If
Select Case duration
Case "low"
…
Case "medium"
…
case else
…
end select