Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
1:)if tNumber contains "1" then
2:)do something
3:)else if tNumber contains "3" then
4:)do something
5:)else if tNumber "10" then
6: do something
7:end if
the loop restart from line 1 when is on line 3
because "1" and "10" is the same
how can override this behavior ?
Last edited by vedus on Sun Apr 05, 2015 5:39 pm, edited 1 time in total.
I am really not sure what you are trying to do, and how your string of numbers in tNumber looks, but...
try going through the checks in order from more specific to general
I am really not sure what you are trying to do, and how your string of numbers in tNumber looks, but...
The numbers is the first digit from the Hour in 24 format and exist in the fields.
The problem i try to solve is, from 19:00 until 7:00 i need to put the Night images and the rest from 8:00 to 18:00 the Day.
The numbers is the first digit from the Hour in 24 format and exist in the fields.
The problem i try to solve is, from 19:00 until 7:00 i need to put the Night images and the rest from 8:00 to 18:00 the Day.
on mouseUp
put the seconds into tday
convert tday to dateitems
if item 4 of tday >= 0 and item 4 of tday < 8 then
--go do night time stuff
end if
if item 4 of tday >= 8 AND item 4 of tday <= 18 then
-- go do day time stuff
end if
if item 4 of tday >= 19 AND item 4 of tday <= 23 then
--go do night time stuff
end if
end mouseUp
Last edited by Dixie on Sun Apr 05, 2015 6:50 pm, edited 1 time in total.
The numbers is the first digit from the Hour in 24 format and exist in the fields.
The problem i try to solve is, from 19:00 until 7:00 i need to put the Night images and the rest from 8:00 to 18:00 the Day.
on mouseUp
put the seconds into tday
convert tday to dateitems
if item 4 of tay >= 0 and item 4 of tday < 8 then
--go do night time stuff
end if
if item 4 of tday >= 8 AND item 4 of tday <= 18 then
-- go do day time stuff
end if
if item 4 of tday >= 19 AND item 4 of tday <= 23 then
--go do night time stuff
end if
end mouseUp