Keep script running

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!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Keep script running

Post by KennyR » Sat Sep 01, 2012 7:24 pm

Hello everyone,
I am about to wrap up a modest application but have a question first. Is there a way to keep a certain script "alive"/running when a phone call or text message is viewed on the iPhone? Thanks to Dixie, I am able to save all my variables and card positions, but I have a timer on one card that I would like to keep running when a phone call interrupts the users session. Any thoughts?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Keep script running

Post by Mark » Wed Sep 05, 2012 12:20 pm

Hi,

The same script that re-loads your variables and card positions can be used to restart your continuously running script. Save the milliseconds to your data file when the app closes and read the milliseconds from the data file and compare this value with the current milliseconds to find out how long your script has not been running.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply