I've coded an alarm system by setting up a button which automatically clicks itself every second to check if the current time is equal to the time set by the user. It works perfectly fine running on my phone except I'm not sure if it takes day light savings into account....I've tested it by moving the time forward on my phone which doesn't affect the button (I can tell because the button also shows the current time at every second in a field ).....but when I move the time backward on my phone, the button stops clicking itself (I can tell because the time in the field stops changing). Is there a better way to code an alarm system which takes day light savings into account as well? Also I'd imagine if the button is clicking itself every second...that would drain the battery..so is there a more better way to code an alarm system? My code looks like this
button "Set"
on mouseUp
put the long time into field "time" (this part of the code is just for me to verify that the button is working properly)
if the long time = "hh:mm:ss am/pm" then
....(sends notification to phone)
end if
send "mouseUp" to button "Set" in 1 second
end mouseUp
Thanks
Coding an alarm system
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Coding an alarm system
Hi again ferhan24badshah,
You got me on this
But you wouldn't create one of those every second.
Also re the other posting you made.
Your app will shutdown at any random time when it's not in focus.
Simon
You got me on this
because you should (and may be) using "mobileCreateLocalNotification".(sends notification to phone)
But you wouldn't create one of those every second.
Also re the other posting you made.
Your app will shutdown at any random time when it's not in focus.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!