Indigo Rose Software
  #1  
Old 07-29-2008
dwenco dwenco is offline
Indigo Rose Customer
 
Join Date: Jul 2008
Posts: 23
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();
Reply With Quote
  #2  
Old 07-29-2008
Ulrich's Avatar
Ulrich Ulrich is offline
Indigo Rose Staff Member
 
Join Date: Apr 2005
Location: Sao Paulo, Brazil
Posts: 823
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
Reply With Quote
  #3  
Old 07-30-2008
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hey upeters,

That's a really great solution to dwenco's problem. Great work!
__________________
MSI Factory The Next Generation Intelligent Setup Builder
Reply With Quote
  #4  
Old 07-30-2008
dwenco dwenco is offline
Indigo Rose Customer
 
Join Date: Jul 2008
Posts: 23
Thanks a lot uPeter! That solved my problem All right.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multilingual User Interface? cydude TrueUpdate 3.5 Discussion 3 05-14-2008 08:58 AM
AppSkin: User Interface Development Kits RizlaUK Developer's Den 1 02-18-2008 02:19 PM
Setup Factory and VS 2005 vazir786 Setup Factory 7.0 Discussion 4 01-13-2006 09:47 PM
HOWTO: Prompt the User for Confirmation Before Exiting Support AutoPlay Media Studio 4.0 Examples 0 10-03-2002 10:50 AM


All times are GMT -6. The time now is 08:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software