Maxpilot Posted December 18, 2008 Share Posted December 18, 2008 Hi,I searched the forums for this but found nothing: Is it possible to send key - combinations with LSHIFT, RSHIFT, LALT etc.? That means like pressing one of these buttons and simultaneously pressing lets say the key "a"?This syntaxTo hold a key down (generally only useful for games) Send("{a down}") ;Holds the A key down Send("{a up}") ;Releases the A keydoes not function with LSHIFT, RSHIFT or keys like this. I tried for example:send ("{{LSHIFT} down}") (in my opinion exactly according to that syntax)as well assend ("{LSHIFT} down")but nothing works.Thanks in advanceMax Link to comment Share on other sites More sharing options...
Malkey Posted December 18, 2008 Share Posted December 18, 2008 Hi, I searched the forums for this but found nothing: Is it possible to send key - combinations with LSHIFT, RSHIFT, LALT etc.? That means like pressing one of these buttons and simultaneously pressing lets say the key "a"? This syntax does not function with LSHIFT, RSHIFT or keys like this. I tried for example: (in my opinion exactly according to that syntax) as well as but nothing works. Thanks in advance MaxSearch on send hold key down You might get an answer, if you wade through all the pages. You can try this testing script and follow the comments. Some things work, kind of. Run("Notepad.exe") WinWaitActive("Untitled - Notepad") Send("abc ") ;Appears lower case Send("{LSHIFT down}") MsgBox(0, "", "wait") ;Type into Notepad ;Appears upper case ;Press OK in MsgBox Send("def ") ;Appears lower case Send("{LSHIFT up}") Send("+g+h+i ") ;Appears upper case Send("{LSHIFT}") Send("jkl ") ;Appears lower case ;Type into Notepad ;Appears upper case ;PRESS Right Shift button on keyboard ;Type into Notepad ;still appears upper case ;PRESS Left Shift button once on keyboard ;Type into Notepad ; Appears lower case The interesting thing here is having to press the left shift key once, to get the keyboard back to normal. Link to comment Share on other sites More sharing options...
Maxpilot Posted December 18, 2008 Author Share Posted December 18, 2008 Thanks a lot! Very interesting: All works as described in the script. Didn't find anything else that helps. What I want to achieve is a remote control of the new helicopter - simulation "Black Shark" (via TCP), where there are a lot of key - combinations with left/right -shift, -alt and -ctrl. So it looks like I cannot do it with autoit. Greetings Max Link to comment Share on other sites More sharing options...
Maxpilot Posted December 19, 2008 Author Share Posted December 19, 2008 Seems to work with another, very similar tool called "Autohotkey". Btw. really very similar, and downward compatible to autoit 2.0. Have these two tools a common development - line? Greetings Max Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now