Page 1 of 1

Using Data from device??

Posted: Sun Jan 22, 2012 12:29 am
by drumdemon7GA727d
How do I make an app that uses information already on the iphone or android. For example, if i wanted to make an app that counted down to December 25, what should i put in the code so that the app takes the date and time information from the device, so it knows exactly how many days hours etc til christmas?

Re: Using Data from device??

Posted: Sun Jan 22, 2012 2:45 am
by Dixie
drumdemon...

I can't be bothered to get into counting down the hours until the next christmas day, but this will get you started...

Code: Select all

on mouseUp
   put the long date into today
   put "12/25/2012" into christmas
   
   convert today to seconds
   convert christmas to seconds
   put "There are" && (christmas - today)/86400 && "days left until Christmas"
end mouseUp
be well

Dixie

Re: Using Data from device??

Posted: Sun Jan 22, 2012 10:48 pm
by drumdemon7GA727d
ohh cool thanks =]