Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


SendKeys - Ctrl, Alt and And

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1201
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> SendKeys - Ctrl, Alt and And
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 SendKeys - Ctrl, Alt and And - 7/31/2004 7:47:11 AM   
  Turkey

 

Posts: 19
Score: 0
Joined: 7/12/2004
From:
Status: offline
First question - what are Control and Alt in SendKeys? I know Enter is "{ENTER}" and backspace is "{BACKSPACE}", but Alt seems to be neither "{ALT}" nor "{ALTER}", and same for Ctrl being neither "{CONTROL}" nor "{CTRL}".

Second question - can you say And in SendKeys. No, not &, AND. Basically, I want to close something via SendKeys, so I tried Alt + F4. As you can see, I couldn't do it. Couldn't get the Alt or the + to work, but the F4 was fine.

Can anyone help[?]
 
 
Post #: 1
 
 Re: SendKeys - Ctrl, Alt and And - 8/1/2004 10:13:49 PM   
  Turkey

 

Posts: 19
Score: 0
Joined: 7/12/2004
From:
Status: offline
Does "no answer" mean no-one knows how to do it, or no-one's looked at the thread yet? Surely SOMEONE knows about SendKeys here.

(in reply to Turkey)
 
 
Post #: 2
 
 Re: SendKeys - Ctrl, Alt and And - 8/2/2004 12:17:08 AM   
  mbouchard


Posts: 1856
Score: 14
Joined: 5/15/2003
From: USA
Status: offline
Copied and pasted from the Windows Script Help file (down load from script center at www.technet.com)

To send keyboard characters that are comprised of a regular keystroke in combination with a SHIFT, CTRL, or ALT, create a compound string argument that represents the keystroke combination. You do this by preceding the regular keystroke with one or more of the following special characters:

Key Special Character
SHIFT +
CTRL ^
ALT %

Note When used this way, these special characters are not enclosed within a set of braces.
To specify that a combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, create a compound string argument with the modified keystrokes enclosed in parentheses. For example, to send the keystroke combination that specifies that the SHIFT key is held down while:

e and c are pressed, send the string argument "+(ec)".
e is pressed, followed by a lone c (with no SHIFT), send the string argument "+ec".

(in reply to Turkey)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> SendKeys - Ctrl, Alt and And Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts