Page 1 of 1 1
Topic Options
#180082 - 2007-09-03 03:17 PM problems with big letters / combination with SHIFT and mstsc.exe
shamuk Offline
Lurker

Registered: 2007-08-31
Posts: 4
I have a problem sending big letters or combinations with the SHIFT, CTRL, and ALT with the SENDKEYS(..) command to the mstsc.exe.. This application seems to receive only small letters and no SHIFT, CTRL, or ALT at all..

Can anyone tell me why or give me a hint to a solution pls..?

Top
#180085 - 2007-09-03 03:27 PM Re: problems with big letters / combination with SHIFT and mstsc.exe [Re: shamuk]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
 Originally Posted By: KiXtart Manual
To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:

SHIFT +
CTRL ^
ALT ~

To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".

Top
#180089 - 2007-09-03 04:05 PM Re: problems with big letters / combination with SHIFT and mstsc.exe [Re: Arend_]
shamuk Offline
Lurker

Registered: 2007-08-31
Posts: 4
Exactly that seems NOT to work if I send this to mstsc.exe..

Additional if I try so send an exclamation mark f.e. I only get a "1"..

 Code:
SENDKEYS('!')

or SENDKEYS('+{1}')

or SENDKEYS('+{!}')


..all results in even just this "1" if sent to mstsc.exe! Same with big letters..

Top
#180092 - 2007-09-03 04:50 PM Re: problems with big letters / combination with SHIFT and mstsc.exe [Re: shamuk]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why the curly {} brackets?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#180095 - 2007-09-03 04:57 PM Re: problems with big letters / combination with SHIFT and mstsc.exe [Re: Les]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Curly brackets are only used for special keys.
Top
#180096 - 2007-09-03 04:58 PM Re: problems with big letters / combination with SHIFT and mstsc.exe [Re: Arend_]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
From Scriptlogic's kixtart 4.53 reference:

SendKeys( )

Action: Sends one or more keystrokes to the active window as if typed at the keyboard.

Syntax: SENDKEYS ("keys")

Parameters: Keys
String specifying the keystrokes to send.

Each key is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, use "A" for string. To represent more than one character, append each additional character to the one preceding it. To represent the letters A, B, and C, use "ABC" for string. The plus sign (+), caret (^),tilde (~), and parentheses ( ) have special meanings to SendKeys. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use {+}. To specify brace characters, use {{} and {}}.

To specify characters that aren't displayed when you press a key, such as ENTER or TAB, and keys that represent actions rather than characters, use the codes shown below:

BACKSPACE {BACKSPACE}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER {ENTER}
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS {INS}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
PRINT SCREEN {PRTSC}
RIGHT ARROW {RIGHT}
TAB {TAB}
UP ARROW {UP}
F1 {F1}
F2 {F2}
F3 {F3}
F4 {F4}
F5 {F5}
F6 {F6}
F7 {F7}
F8 {F8}
F9 {F9}
F10 {F10}
F11 {F11}
F12 {F12}
F13 {F13}
F14 {F14}
F15 {F15}
F16 {F16}

To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:

SHIFT +
CTRL ^
ALT ~

To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".

To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 42} means press the LEFT ARROW key 42 times; {h 10} means press H 10 times.

Remarks: You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows. Sendkeys also can't send the PRINT SCREEN key {PRTSC} to any application.

Returns: 0 Keystrokes sent
Error code Function failed


See Also: SetFocus( )

Example: Run("Notepad.exe")
SetFocus("Untitled – Notepad")
$ReturnCode = SendKeys("Hello World")
Sleep( 2 )
$ReturnCode = SendKeys("~{F4}Y")

Top
#180097 - 2007-09-03 05:01 PM Re: problems with big letters / combination with SHIFT and mstsc.exe [Re: Les]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
Most likely the caps lock is on, on the computer in question.

See these threads for more info and ideas:
http://www.kixtart.org/forums/ubbthreads...ge=1&Main=19791
http://www.kixtart.org/forums/ubbthreads...ge=1&Main=19822
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=121320#Post121320

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.057 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org