Jump to content
Sign in to follow this  
chenxu

Confused by HotKeyset

Recommended Posts

chenxu

This is some simple code:

HotKeySet ("A", "snd")

While 1
    Sleep(2000)
WEnd

Func snd()
    Send("ang")
EndFunc

This 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 by chenxu

Share this post


Link to post
Share on other sites
chenxu

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.

Share this post


Link to post
Share on other sites
chenxu

:)

It does not work neither, but still thanks for replying.

Share this post


Link to post
Share on other sites
d4rk

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

Share this post


Link to post
Share on other sites
ProgAndy

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 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×