caladan1 Posted June 11, 2017 Share Posted June 11, 2017 1. What is the code of the menu key (that one between AltGr and RCtrl)? I want to make a hotkey using it: e.g. HotKeySet("{THAT_MENU_KEY_CODE?}","MenuKey") I read the whole Send help page but I didn't find it. the menu key 2. How could I use CapsLock like a regular key, so it's never switched on? In AutoHotkey there something like: Capslock::Send ^n +Capslock::Capslock Return Anything similar in AutoIt? Thanks in advance. Link to comment Share on other sites More sharing options...
Jefrey Posted June 11, 2017 Share Posted June 11, 2017 (edited) 1. I use Mac with bootcamp so I don't have the context menu key, so I can't confirm what I'm saying... I use Shift + F10 instead. But it looks like the symbol is {APPSKEY} (source). 2. Do you mean not allowing the user to turn on capslock? Opt("SendCapslockMode", 0) HotKeySet("{CAPSLOCK}", "disablecapslock") Func disablecapslock() Send("{CAPSLOCK off}") EndFunc while 1 sleep(100) wend Edited June 11, 2017 by Jefrey My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
caladan1 Posted June 11, 2017 Author Share Posted June 11, 2017 @Jefrey 2. I meant that CapsLock led should not be turned on. So far I did: AutoItSetOption("SendCapslockMode", 0) HotKeySet("{CAPSLOCK}","CapsLockKey") Func CapsLockKey() Send("^!{n}") EndFunc Now I need to stop that led from turning it on (basically to turn off the CapsLock state instantly; to behave like an ordinary key). Link to comment Share on other sites More sharing options...
caladan1 Posted June 11, 2017 Author Share Posted June 11, 2017 @Jefrey 1. Thanks, that's the key code. Unfortunately it appears a context menu too. Anyone has an idea how to disable that context menu completely after pressing the Menu key? Link to comment Share on other sites More sharing options...
Jefrey Posted June 12, 2017 Share Posted June 12, 2017 1. Unfortunately as I said above my keyboard doesn't have the apps key so I'm unable to test it but can you send an Esc? Something like this: HotKeySet("{APPSKEY}", "test") Func test() Send("{ESC}") EndFunc While 1 sleep(100) WEnd 2. Truly the code I provided denies me from turning on the "caps lock" LED (it never turns on although I press it if the script is running). Perhaps some machines have it hardware-controlled, whereas machines like mine have it software (driver)-controlled? My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
caladan1 Posted June 12, 2017 Author Share Posted June 12, 2017 1. That menu stills appears for a fraction of a second. Bad luck. 2. Thanks for that code, it's solved now. This is the final version (Caps Lock sends the shortcut CTRL ALT N and turns CAPS LOCK off immediately): HotKeySet("{CAPSLOCK}","CapsLockKey") Func CapsLockKey() Send("^!{n}") HotKeySet("{CAPSLOCK}") Send("{CAPSLOCK off}") HotKeySet("{CAPSLOCK}","CapsLockKey") EndFunc Link to comment Share on other sites More sharing options...
Jefrey Posted June 12, 2017 Share Posted June 12, 2017 29 minutes ago, caladan1 said: 1. That menu stills appears for a fraction of a second. Bad luck. Can you set Opt("SendKeyDelay", 0) and see if it makes any change? Sorry I can't test it here (just remembering my keyboard doesn't have that key) My stuff Spoiler My UDFs _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS · storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt Link to comment Share on other sites More sharing options...
anthonyjr2 Posted June 12, 2017 Share Posted June 12, 2017 From what I have searched I don't think it's possible to intercept the menu key without the menu popping up for a fraction of a second, at least in AutoIt. I'm basing it off of here, although it is an old thread so maybe someone has found a way since then. UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI= Link to comment Share on other sites More sharing options...
caladan1 Posted June 13, 2017 Author Share Posted June 13, 2017 3 hours ago, anthonyjr2 said: From what I have searched I don't think it's possible to intercept the menu key without the menu popping up for a fraction of a second, at least in AutoIt. I'm basing it off of here, although it is an old thread so maybe someone has found a way since then. Thanks for answer. I think that menu should be disabled from Windows (Registry?). So, it looks I have to find another shortcut key. Link to comment Share on other sites More sharing options...
caladan1 Posted June 13, 2017 Author Share Posted June 13, 2017 4 hours ago, Jefrey said: Can you set Opt("SendKeyDelay", 0) and see if it makes any change? Sorry I can't test it here (just remembering my keyboard doesn't have that key) The menu is still displayed. As anthonyj2 said, it doesn't seem possible. In AutoHotkey I managed to use that Menu key without the menu appearing (except on rare occasions). 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