qwert Posted September 13, 2011 Posted September 13, 2011 On the far left of the keyboard is the Left Quote key (the lower case of the tilde key). I want to assign it as a hotkey, but I want to specify it in {ASC xx} format ... as in HotKeySet("{ASC 65}", "Action") The ascii tables say it's 96 ... but 96 doesn't work. I've searched probably 50 online sources and can find no other code specified. How can I view what code is being sent from the keyboard? Or better, does anyone happen to know what the code is? Thanks for any help.
UEZ Posted September 13, 2011 Posted September 13, 2011 (edited) This works for me:HotKeySet("{`}", "Test") While Sleep(100000) WEnd Func Test() Exit EndFunc orHotKeySet("{" & Chr(96) & "}", "Test") While Sleep(100000) WEnd Func Test() Exit EndFuncIf I press Shift + ` the script ends.I have a German keyboard in the key is left to the backspace key. Br,UEZ Edited September 13, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
qwert Posted September 13, 2011 Author Posted September 13, 2011 Interesting. Both of those work for me, as well. So, 96 is the right code. Does this mean that AutoIt has a problem expressing 96 in the {ASC 96} form? Or is there a rule about it that I haven't found? I wanted to use the ASC specifier because I have other control strings that are set up that way in the script and I just looked right to have the all the same. But not if they don't work, of course. Thanks for your help.
UEZ Posted September 14, 2011 Posted September 14, 2011 I cannot fully understand why you want to use ASC() but you can use this way maybe: HotKeySet("{" & Chr(Asc("`")) & "}", "Test") Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
AdmiralAlkex Posted September 14, 2011 Posted September 14, 2011 I haven't tested it, but the helpfile tells you to use a leading zero on 2-digit codes, which you are not. Quote To send the ASCII value A (same as pressing ALT+065 on the numeric keypad)Send("{ASC 065}")(When using 2 digit ASCII codes you must use a leading 0, otherwise an obsolete 437 code page is used). .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
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