Announcement

Collapse
No announcement yet.

Making Data Persist Across Sessions

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

  • Making Data Persist Across Sessions

    Making Data Persist Across Sessions

    Making Data Persist Across Sessions

    Document ID: IR10037
    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 persist data across sessions.

    DISCUSSION

    It is often nice to add a personal touch to your Application, such as greeting the user by name whenever your application is run.

    As an example, we will create an application that prompts the user for their name the first time it is run, and stores that data in the registry. Every subsequent time that the application is run, it will greet the user with the name that they have inputted:

    Place the following code in your Project's On Startup event:

    user = Application.LoadValue("Information", "Name");



    if user == "" then

    user = "Unknown User";

    user = Dialog.Input("Information Requested", "Please enter your full name:", "", MB_ICONQUESTION);

    Application.SaveValue("Information", "Name", user);

    end



    Dialog.Message("Welcome", "Hello "..user..", welcome to my application");

    This example prompts the user to enter their full name the first time they run your application, and stores that value in the registry. Every subsequent time that the user runs your application a message will pop up on the screen greeting them by name.

    MORE INFORMATION

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

    • Program Reference | Actions | Application | Application.LoadValue
    • Program Reference | Actions | Application | Application.SaveValue

    KEYWORDS: AutoPlay Media Studio 5.0, Actions, Load, Save, Persist, Sessions, Remember


    Last reviewed: September 26, 2003
    Copyright © 2003 Indigo Rose Corporation. All rights reserved.
Working...
X