Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2008
    Posts
    37

    User Interface timeout

    I would like to timeout a screen/User Interface if the user does not respond in say 3 seconds, and carry on with the update/installation. I have tried the following and it just doesn't remove the screen. Is there anyway to get around it?

    Thank you.

    Screen.Show("Update Required");
    Application.Sleep(3000);
    Screen.End();

  2. #2
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Yes, there is. But note that the Application.Sleep(3000) you are using actually freezes the application for three seconds, and even if the user does something during this time, your updater will still ignore him. This is not what you are trying to do.

    The better way would be this: Double-click the screen you wish to apply a timeout to. Open the "On Preload" tab and add the following:
    Code:
    -- These actions are performed before the screen is shown.
    Screen.StartTimer(5000);
    With this single line, you start a timer for the current screen. But just this doesn't do anything, you'll have to react to the timeout as well. So now open the "On Ctrl Message" and add the following for testing:

    Code:
    -- These actions are triggered by the controls on the screen.
    if (e_MsgID == MSGID_ONTIMER) then
        -- show a message before jumping to the next screen automatically
        Dialog.Message("Notice", "Time's up!", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
        -- now jump
        Screen.Next();
    end
    Now, if you don't do anything for 5 seconds, you see a pop-up window, and once you close it, you will be redirected to the next screen.
    I would recommend that you place the following at least in the "On Next" and "On Help" tabs as well, to avoid the firing of the timer event in the moment when the user is already responding or reading the help for the screen:

    Code:
    Screen.StopTimer();
    Ulrich

  3. #3
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943
    Hey upeters,

    That's a really great solution to dwenco's problem. Great work!
    MSI Factory The Next Generation Intelligent Setup Builder

  4. #4
    Join Date
    Jul 2008
    Posts
    37
    Thanks a lot uPeter! That solved my problem All right.

Similar Threads

  1. Multilingual User Interface?
    By cydude in forum TrueUpdate 3.5 Discussion
    Replies: 3
    Last Post: 05-14-2008, 07:58 AM
  2. Setup Factory and VS 2005
    By vazir786 in forum Setup Factory 7.0
    Replies: 4
    Last Post: 01-13-2006, 08:47 PM
  3. HOWTO: Prompt the User for Confirmation Before Exiting
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 09:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts