
PRO
dbeard
USA
Asked
— Edited

Depending on the time of the day, I want my robot to do one thing or a different thing. I cant figure the logic out to make something like below to happen.
I am hoping someone can give me some hints.
Here is my script
If ($time > "9:30:00" and $time "16:00"00" and $time < "09:30:00")
print("to the other thing")
endif
Thanks in advance.
I think you can use this function:
WaitUntilTime( hour, minute )
Waits until the specified time. The script will stop at this command and not continue until the specified time. The time is declared in 24 hour format.
Example: WaitUntilTime(17, 30)
Or you can try your way first by assigning the $time to another variable and comparing it using the 24 hour format as above
Hope this helps
regards
Code:
Code:
I don't think you can compare the times like that either. I'll look into it though.
Code:
If you wanted to dispense with the ConvertTimesToNumbers Goto routine, you could put the times in as numbers by leaving out the colons yourself. For example:
"9:30:00" would be "93000"
The only thing that would still need converting would be the current time. If you did it that way the code could be:
Code:
Code: