I tried to understand to logic behind the following script and do not see the mistake in it, as unfortunatly it is not working at all on my Pronto.
Am I correct with the following assumotions in red:
var myTime = GUI.getDisplayTime(); var "JUST ANY NAME I WANT is requesting the time in format HH:MM if(myTime.substring(2, 3) == ":") {myHour = myTime.substring(0,2);} This is for the hours from 10 to 24 in order to count under "myHour" the digits at position "0"? and 2 (shouldn´t there be digits 1 and 2 counted ?) else if(myTime.substring(1, 2) == ":") {myHour = myTime.substring(0,1);} This is for the hours from 0 to 9 in order to count under "myHour" the single remaining hour digit (whatfor the "0"is standing there?)
myHour=1*myHour; This is to make a logic number out of the myHour text ?
if (myHour<7 || myHour>=18){CF.widget("Button A","page","Activity").executeActions();} If result of myHour is bigger than 18 or smaller than 7 the execute the action that is on button A
else {CF.widget("Button B","page",Activity").executeActions();} If result is not as described in the row before than execute action stored under button B
I am pretty sure that the activitiy, page and button do have the right ProntoScript name mentioned in the script, so has anyone an idea where the mistake(s) is/are ?