Solved

Wait time for msgbox selection

Posted on 2006-06-15
4
715 Views
Last Modified: 2012-05-05
Is ther a way to set the wait time on a msgbox? I have a logoff script that promts users for yes or no to backups. They seem to not be able to wait the 2 seconds it takes for the box to pop up so I want to wait 10 seconds for them to choose then force the back up. Any ideas?
0
Comment
Question by:t1clausen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
lunchbyte earned 500 total points
ID: 16911958
I looked into that in the past and I did not find any. You may need to come up with custom msgbox using form so you can leave your timer on it.

You can count how many time they clicked on no so if they clicked on no 3 times then force backup the next time.
0
 
LVL 2

Author Comment

by:t1clausen
ID: 16912059
Yeah I thought about that but I keep getting calls in the morning because they turn thier monitors off as soon as they hit log off and then never select yes or no on the script. If I force the backup everytime they log off the complain because it takes to long. I guess they will have to learn to wait 2 seconds... :-) Thanks!
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16912070
"I have a logoff script"

Are you using VBScript (.vbs) or VB6?

0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16912339
For VBScript (.vbs), see the Popup method:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/f482c739-3cf9-4139-a6af-3bde299b8009.asp


Set WshShell = WScript.CreateObject("WScript.Shell")
ret = WshShell.Popup("Perform Backup?", 10, "Backup", 4 + 32)
Select Case ret
   Case -1 ' Timeout
      WScript.Echo "TimeOut"
           
   Case 6 ' Yes
      WScript.Echo "Yes"
           
   Case 7 ' No
      WScript.Echo "No"
           
End Select
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month4 days, 23 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question