I want to use this hotkeys global in win11
Code: Select all
$XButton2::Click 2
$XButton1::Click
for example, it not works in osk.exe where I mainly need it
hope some expert knows a solution
thanks a lot
Code: Select all
$XButton2::Click 2
$XButton1::Click
How do I work around problems caused by User Account Control (UAC)?
By default, User Account Control (UAC) protects "elevated" programs (that is, programs which are running as admin) from being automated by non-elevated programs, since that would allow them to bypass security restrictions. Hotkeys are also blocked, so for instance, a non-elevated program cannot spy on input intended for an elevated program.
...
Common workarounds are as follows:Source: Frequently Asked Questions (FAQ) | AutoHotkey
- Enable the Add 'Run with UI Access' to context menus option in AutoHotkey Setup. This option can be enabled or disabled without reinstalling AutoHotkey by re-running AutoHotkey Setup from the Start menu. Once it is enabled, launch your script file by right-clicking it and selecting Run with UI Access, or use a command line like "AutoHotkeyU32_UIA.exe" "Your script.ahk" (but include full paths).
- ... [other less ideal workarounds, including run as admin] ...