Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

Setting my Application to Expire After a Certain Date

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting my Application to Expire After a Certain Date

    AutoPlay Media Studio 5.0 Knowledge Base

    Setting my Application to Expire After a Certain Date

    Document ID: IR10063
    The information in this article applies to:
    • AutoPlay Media Studio 5.0 Standard Edition
    • AutoPlay Media Studio 5.0 Professional Edition

    SUMMARY

    This article describes how to set your application to expire after a certain date.

    DISCUSSION

    To make your application expire after a certain date, set a variable in your program to the expiry date, and every time the program is run, check the current date against that value.

    To accomplish this, insert the following code into the On Startup event of your project:

    --Input your expiration date here, format YYYYMMDD

    --(no spaces, dashes, slashes, etc. just use numbers)

    --Below is the date Dec 12, 2003

    Expiration_Date = "20031212"



    --Get the system date in ISO format

    --Date = YYYY-MM-DD

    Date = System.GetDate(DATE_FMT_ISO);



    --Remove the dashes in the ISO format date

    --to reflect the format of our expiry date

    --Date == YYYYMMDD

    Date = String.Replace(Date, "-", "", false);



    --test to see if the application is expired

    if Date > Expiration_Date then

    --The application has expired

    Dialog.Message ("", "application is expired");

    Application.Exit();

    end

    MORE INFORMATION

    For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:

    • Program Reference | Actions | System | System.GetDate

    KEYWORDS: AutoPlay Media Studio 5.0, Expire, Trial, Version, Date


    Last reviewed: October 1, 2003
    Copyright 2003 Indigo Rose Corporation. All rights reserved.
Working...
X