I don’t quit follow the goal of the if/else. You want to see
if ( lat and long are at the office )
do:
set atTheOffice to true
navigate to screen 2
else:
set atTheOffice to false
and just sit idle
Right now your logic is only going to set “atTheOffice” to true if you are in the lat long specified, or set it to false if you are not. you will never get to the “Navigate to screen 2” command. (unless something happens on another screen that can set "atTheOffice to true.
the most straight forward way would have one huge if line but would look like:
if ( (lat > 46.760082 and lat < 46… ) and (long > 23… and long < 23…) )
do {
set atTheOffice to true
navigate to screen2
}
else
set atTheOffice to false
its usually a good idea to do an error condition:
if error
do: set labelx text to error
elseif ( (lat > 46.760082 and lat < 46… ) and (long > 23… and long < 23…) )
do {
set atTheOffice to true
navigate to screen2
}
else
set atTheOffice to false