RE: Slowing Outlook Vbscript macro

2002-02-13 Thread Steve Rosco

This is something I have used in Excel. It was cut from MS help for VB
applications. Don't know if it will work for what you are doing, but
worth a try.

' we have to wait while the previous command runs.
PauseTime = 5   ' Set duration.
Start = Timer   ' Set start time.
Do While Timer  Start + PauseTime
DoEvents' Yield to other processes.
Loop


Steve Rosco
[EMAIL PROTECTED]

-Original Message-
From: Ryan Gorman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 7:47 AM
To: MS-Exchange Admin Issues
Subject: Slowing Outlook Vbscript macro


I've got a macro (Outlook XP) that does some Sendkeys - but I need to
pause
between key presses. If this was a Wscript VBS I would do

Sendkeys (%f)
Wscript.sleep 1000
Sendkeys (o)

This doesn't work within Outlook. Pointers?


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk


List Charter and FAQ at:
http://www.sunbelt-software.com/exchange_list_charter.htm


List Charter and FAQ at:
http://www.sunbelt-software.com/exchange_list_charter.htm




RE: Slowing Outlook Vbscript macro

2002-02-13 Thread Ryan Gorman

Thank Patrica and Steve - it's ugly but it works


-Original Message-
From: Steve Rosco [mailto:[EMAIL PROTECTED]] 


This is something I have used in Excel. It was cut from MS help for VB
applications. Don't know if it will work for what you are doing, but worth a
try.

' we have to wait while the previous command runs.
PauseTime = 5   ' Set duration.
Start = Timer   ' Set start time.
Do While Timer  Start + PauseTime
DoEvents' Yield to other processes.
Loop



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk


List Charter and FAQ at:
http://www.sunbelt-software.com/exchange_list_charter.htm




Re: Slowing Outlook Vbscript macro

2002-02-13 Thread Patricia Cardoza

What about the timer event?

See this example:

Dim PauseTime, Start, Finish, TotalTime
If (MsgBox(Press Yes to pause for 5 seconds, 4)) = vbYes Then
PauseTime = 5' Set duration.
Start = Timer' Set start time.
Do While Timer  Start + PauseTime
DoEvents' Yield to other processes.
Loop
Finish = Timer' Set end time.
TotalTime = Finish - Start' Calculate total time.
MsgBox Paused for   TotalTime   seconds
Else
End
End If




List Charter and FAQ at:
http://www.sunbelt-software.com/exchange_list_charter.htm