CShadowRun Posted August 31, 2008 Share Posted August 31, 2008 Sending the following keystrokes using controlsend {LSHIFT DOWN} {a DOWN} {a UP} {LSHIFT UP} Results in a lower case "a", shouldn't this be an uppercase A? Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Share Posted August 31, 2008 a is not A... {UP} = Up arrow Link to comment Share on other sites More sharing options...
CShadowRun Posted August 31, 2008 Author Share Posted August 31, 2008 a is not A... {UP} = Up arrowPlease read the docs before saying people are wrong http://www.autoitscript.com/autoit3/docs/functions/Send.htmTo hold a key down (generally only useful for games) Send("{a down}") ;Holds the A key down Send("{a up}") ;Releases the A keySending {a DOWN} or {A DOWN} makes no diffrence, it still comes out as a. Link to comment Share on other sites More sharing options...
oMBRa Posted August 31, 2008 Share Posted August 31, 2008 (edited) I'm sorry... try to set capslock on, then send {A DOWN} Edited August 31, 2008 by oMBra Link to comment Share on other sites More sharing options...
CShadowRun Posted August 31, 2008 Author Share Posted August 31, 2008 I'm sorry... try to set capslock on, then send {A DOWN}this is for gaming, so that's not really any good. I need the shift down to work properly Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 31, 2008 Share Posted August 31, 2008 Why use so many Send()? use: Send("A") or if you must have the SHIFT use: Send("{LSHIFT DOWN}{A DOWN}{A UP}{LSHIFT UP}") ;looks better with all uppercase :P both gives an uppercase "A" .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
CShadowRun Posted August 31, 2008 Author Share Posted August 31, 2008 (edited) Why use so many Send()? use: Send("A") or if you must have the SHIFT use: Send("{LSHIFT DOWN}{A DOWN}{A UP}{LSHIFT UP}");looks better with all uppercase :P both gives an uppercase "A" ControlSend("Untitled - Notepad", "", "Edit1", "{LSHIFT DOWN}{A DOWN}{A UP}{LSHIFT UP}") Lowercase a The reason for sending them seperatly. I'm making something called a multicaster. This basically means theres a group of windows, and if i type in any of the group, the keycodes get "multicasted" between all of those windows. The keystrokes are all seperate, because obviously the keystrokes are actually pressed individually. Edited August 31, 2008 by CShadowRun Link to comment Share on other sites More sharing options...
bogQ Posted August 31, 2008 Share Posted August 31, 2008 (edited) SendCapslockMode maby can help or {CAPSLOCK off/on} probably with _IsPressed function Edited August 31, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
CShadowRun Posted August 31, 2008 Author Share Posted August 31, 2008 (edited) SendCapslockMode maby can helpor {CAPSLOCK off/on} probably with _IsPressed functionAs i said earlier, this is for gaming, so this will not workI think this is a bug in autoit, it seems really bad with modifiers. Edited August 31, 2008 by CShadowRun Link to comment Share on other sites More sharing options...
CShadowRun Posted August 31, 2008 Author Share Posted August 31, 2008 (edited) I'm pretty sure this is a bug. Using Send() to send... {RSHIFT DOWN} {a DOWN} {a UP} {RSHIFT UP} Results in shift being stuck. Using ControlSend() to send... {RSHIFT DOWN} {a DOWN} {a UP} {RSHIFT UP} Results in a lowercase a. Edited August 31, 2008 by CShadowRun Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 1, 2008 Share Posted September 1, 2008 I'm pretty sure this is a bug. Using Send() to send... {RSHIFT DOWN} {a DOWN} {a UP} {RSHIFT UP} Results in shift being stuck. - snipped -Try sending another SHIFT afterwards to "unstuck" it, that works for me Send("{LSHIFT DOWN}{A DOWN}{A UP}{LSHIFT UP}{LSHIFT}") .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
bogQ Posted September 1, 2008 Share Posted September 1, 2008 (edited) dont see the point of holding your shift down or not becose as soon as you hold it you relice it O_o its almost the same as send("a") send("A") To hold a key down, Send("{a down}") ;Holds the A key down if it whas made to hold more then one key down then controlsend("{+a down}") shud work, but its not working becose that command do not exsist, its not in the help file for the controlsend command its not on the forum, it can hold one key (every key 4 it self) to shift some letter there r other wayes and i dont see {RSHIFT DOWN} command anywhere in the help file 4 controlsend (maby it whas {SHIFTDOWN} ), if i say another word this is gona confuze me more than it shud, so pls try exsamples SendKeyDownDelay Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default. Time in milliseconds to pause (default=5). Opt("SendKeyDownDelay", 1000) ;1000=1sec WinActivate("Untitled - Notepad") sleep(1000) send("{SHIFTDOWN}");~ Sleep(1000) send("a");~ Sleep(1000) send("{SHIFTUP}");~ Sleep(1000) ControlSend("Untitled - Notepad", "", "Edit1", "{SHIFTDOWN}{a DOWN}{a UP}{SHIFTUP}") ;will send A ControlSend("Untitled - Notepad", "", "Edit1", "{SHIFTDOWN}{A DOWN}{A UP}{SHIFTUP}") ;will send A ControlSend("Untitled - Notepad", "", "Edit1", "{a DOWN}{a UP}") ;will send a ControlSend("Untitled - Notepad", "", "Edit1", "{A DOWN}{A UP}") ;will send a ControlSend("Untitled - Notepad", "", "Edit1", "+a") ;will send A ControlSend("Untitled - Notepad", "", "Edit1", "+A") ;will send A ControlSend("Untitled - Notepad", "", "Edit1", "a") ;will send a ControlSend("Untitled - Notepad", "", "Edit1", "A") ;will send A edit: AdmiralAlkex it look like {LSHIFT DOWN} dont work on the controlsend (its not in help file that any :DOWN}: is working on controlsend)and it seems that CShadowRun is trying to do it with controlsend. using controlsend edit: N.B. Some programs are very choosy about capital letters and CTRL keys, i.e. "^A" is different to "^a". The first says CTRL+SHIFT+A, the second is CTRL+a. If in doubt, use lowercase! edit: controlsend from help file As mention in the Send help the keyboard that send different chars when in CAPS LOCK and using the Shift Key cannot be simulated. Edited September 1, 2008 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
herewasplato Posted September 1, 2008 Share Posted September 1, 2008 WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") Send("{LSHIFT DOWN}{A DOWN}{A UP}{LSHIFT UP}")Uppercase A :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
bogQ Posted September 1, 2008 Share Posted September 1, 2008 WinActivate("Untitled - Notepad") WinWaitActive("Untitled - Notepad") Send("{LSHIFT DOWN}{A DOWN}{A UP}{LSHIFT UP}")Uppercase A :-) using controlsend? xD TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
herewasplato Posted September 1, 2008 Share Posted September 1, 2008 (edited) using controlsend? xDNo can do - using the sequence the OP posted... which was my only point: that the sequence posted by the OP can make the letter "A" - just not with ControlSend.You already demo'd different code to make "A" via ControlSend. I was pointing out the delta between ControlSend and Send to the OP for the sequence he posted. I should have explained all of that.The help file is careful to say that ControlSend works with modifiers:"and yes it does send shift, ctrl, alt etc"... but apparently, not all the ways that AutoIt sends modifiers. Edited September 1, 2008 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] 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