SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
CAPS LOCK

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
CAPS LOCK
Author Message
Mark



Joined: 09 Jan 2002
Posts: 32

Post CAPS LOCK Reply with quote


I'm using the SendKeys() function to send keys to a command line app. (It's a PGP app that needs a passphrase entered). I had a problem with the script last night because CAPS LOCK was turned on. What can I do about this? Is there a way to make sure CAPS LOCK is off? Or is there some other alternative?

Thanks,
Mark

Tue Apr 23, 2002 9:08 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: CAPS LOCK Reply with quote

You can send {CAPS LOCK} to turn it off but the problem is that you need to know whether it is turned on or not. I am sure this can be done in a script. I will check how to get the state of CAPS LOCK and post some example script here.

: I'm using the SendKeys() function to send keys to a command line app. (It's a
: PGP app that needs a passphrase entered). I had a problem with the script
: last night because CAPS LOCK was turned on. What can I do about this? Is
: there a way to make sure CAPS LOCK is off? Or is there some other
: alternative?

: Thanks,
: Mark

Tue Apr 23, 2002 10:43 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: CAPS LOCK Reply with quote

Here is how you can do that using VBScript in 24x7. Th WScrip.Shell implementation of SendKeys doesn't depend on the state of CAPS LOCK. Use this script as an example.

Sub Main()

Dim ShellObject

' Create shell object

Set ShellObject = CreateObject("WScript.Shell")

' Run my program

ShellObject.Run "notepad", 9

' Give my program some time to load (3 seconds)

JALScript.Execute("Wait 3")

' Send the keys

ShellObject.SendKeys "Hello World!"

ShellObject.SendKeys "{ENTER}"
End sub

Tue Apr 23, 2002 1:17 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.