chenxu Posted May 1, 2008 Posted May 1, 2008 (edited) This is some simple code:HotKeySet ("A", "snd") While 1 Sleep(2000) WEnd Func snd() Send("ang") EndFuncThis is a keyboard input helper, as you see, what I want is that every time I press 'A' by keyboard, the script send a string "ang" to the key focused window. But, it does not do what I want, when an 'A' is pressed(shift + a), the script send "ANG" but "ang" to the key focused window, after that, the SHIFT key is automaticly pressed by the script, what ever I type is in upper case. until I press the SHIFT key again.How to fix the script? The purpose is I want is that every time I press 'A' by keyboard, the script send a string "ang" to the key focused window Edited May 1, 2008 by chenxu
monoceres Posted May 1, 2008 Posted May 1, 2008 This is some simple code: HotKeySet ("A", "snd") While 1 Sleep(2000) WEnd Func snd() Send("ang") EndFunc Broken link? PM me and I'll send you the file!
chenxu Posted May 1, 2008 Author Posted May 1, 2008 Another problem about this scirpt, I press Caps Lock and press 'a' on the keyboard, in this situation, an 'A' is typed, this is to say, the script does not take any effect.
chenxu Posted May 1, 2008 Author Posted May 1, 2008 It does not work neither, but still thanks for replying.
monoceres Posted May 1, 2008 Posted May 1, 2008 Just to be clear, this doesn't work for you? HotKeySet("+a","snd") while 1 sleep(100) WEnd Func snd() Send("ang") EndFunc Broken link? PM me and I'll send you the file!
chenxu Posted May 1, 2008 Author Posted May 1, 2008 Just to be clear, this doesn't work for you? HotKeySet("+a","snd") while 1 sleep(100) WEnd Func snd() Send("ang") EndFuncYes, it doesn't work for me, I meet the same problem.
d4rk Posted May 1, 2008 Posted May 1, 2008 HotKeySet("+a","snd") while 1 sleep(100) WEnd Func snd() $b=StringLower("ANG") send($b) EndFunc [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys
ProgAndy Posted May 1, 2008 Posted May 1, 2008 (edited) You have to use an extended Sned Function, that waits, until SHIFT-Key is not pressed anymore /Edit: But i don't know, why, For me, it works without this. Edited May 1, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
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