|
|
My 1st attempt at a 30 day trial expiry script...
Hi folks, this is my first posting here and I would like to say hi to
you all!
I have put together a script that times out after 30 days and also
prevents people putting their system clock back after it has timed
out. There may be scripts like this already (and mine may need
tweaking slightly), but here it is - if any of you want to use it, go
ahead - if any of you want to make suggestions as to the structure of
it then please do so!
It uses two global fields - 'Date' and 'counter'.
**********START
Allow User Abort [Off]
Set Error Capture [On]
If ["counter = 2"]
Show message ["Sorry this demo has expired."]
Quit Application
Else
If ["IsEmpty(Date)"]
Set Field ["Date","Status (CurrentDate)+30"]
Set Field ["counter","1"]
Show Message ["This demo will expire in 30 days."]
Exit Script
Else
If ["Status (CurrentDate) > Date"]
Set Field ["counter","2"]
Show Message ["Sorry this demo has expired."]
Quit Application
End If
End If
End If
**********END
By setting the counter to '2', even if the system time/date settings
are reset, it still won't open because counter = 2.
The script may need tidying up (as I say this is my first attempt) so
if anyone can see a major flaw in it, please feel free to tell me!
Hope this helps some of you!
Regards
CN
|
|
0
|
|
|
|
Reply
|
comfortablynumb
|
12/24/2003 11:31:36 AM |
|
|
0 Replies
301 Views
(page loaded in 0.016 seconds)
|
|
|
|
|
|
|
|
|