Time limited demo

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dalkin
Posts: 183
Joined: Wed Jul 04, 2007 2:32 am
Contact:

Time limited demo

Post by dalkin » Tue Oct 09, 2007 11:03 pm

Has anyone got any advice for time-limiting an app? I need to beta test but I want to limit the experience to 10 days (or so).

Regards,
The underlying purpose of Al is to allow wealth to access skill
while removing from the skilled the ability to access wealth.

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

Post by Mark » Tue Oct 09, 2007 11:57 pm

dalkin,

Simply compare the seconds with a value equal to the seconds 10 days from now. Simply put:

Code: Select all

constant kBuildDate = 1191970419 -- 10/10/07

if the seconds > kBuildDate + 864000 then quit
Of course, you probably want to handle quitting in a more sophisticated way.

Best,

Mark
Last edited by Mark on Wed Oct 10, 2007 1:44 pm, edited 2 times in total.
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

dalkin
Posts: 183
Joined: Wed Jul 04, 2007 2:32 am
Contact:

Post by dalkin » Wed Oct 10, 2007 12:02 am

Thanks Mark - much appreciated, I'd been fiddling around with system dates and I'd been getting hopelessly lost!
The underlying purpose of Al is to allow wealth to access skill
while removing from the skilled the ability to access wealth.

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

Post by Mark » Wed Oct 10, 2007 12:07 am

(note: I made a mistake when pasting a number in my previous post and have corrected this) -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