gardinerdm
06-06-2002, 08:33 PM
Hello,
I'm trying to use SendKeys in an effort to send "Alt-T S A" to my exchange client (Synchronize All Folders). It works 90% of the time... but about 10% of the time it drops the S and the A... It always drops the S and A on the first script run after a new logon... successive script runs work fine. Is there a better way to get this done?
Best Rgds, Dan
Gwap = WshShell.Popup("Synchronizing All Folders", 5, "Please Wait!", 4161)
If Gwap = -1 Then
WshShell.AppActivate "Exchange"
WScript.Sleep 500 'sleep for .5 seconds
WshShell.SendKeys "%(t)sa"
ElseIf Gwap = 1 Then
WshShell.AppActivate "Exchange"
WScript.Sleep 500 'sleep for .5 seconds
WshShell.SendKeys "%(t)sa"
ElseIf Gwap = 2 Then
kill = WshShell.Run("kill -f exchng32", 7, True)
End If
I'm trying to use SendKeys in an effort to send "Alt-T S A" to my exchange client (Synchronize All Folders). It works 90% of the time... but about 10% of the time it drops the S and the A... It always drops the S and A on the first script run after a new logon... successive script runs work fine. Is there a better way to get this done?
Best Rgds, Dan
Gwap = WshShell.Popup("Synchronizing All Folders", 5, "Please Wait!", 4161)
If Gwap = -1 Then
WshShell.AppActivate "Exchange"
WScript.Sleep 500 'sleep for .5 seconds
WshShell.SendKeys "%(t)sa"
ElseIf Gwap = 1 Then
WshShell.AppActivate "Exchange"
WScript.Sleep 500 'sleep for .5 seconds
WshShell.SendKeys "%(t)sa"
ElseIf Gwap = 2 Then
kill = WshShell.Run("kill -f exchng32", 7, True)
End If