Page 1 of 1

AHK script not working in some application

Posted: 29 Dec 2023, 05:57
by php
Hello! This is my first post in the forum.
I am currently using PowerToy keyboard manager to swap Ctrl and Alt to each other (because I am used to be a Mac user :))
But I want to keep the functionality to zoom in/out by Ctrl+Scrolling, instead of using Alt+Scrolling, so I use ATK with the following script:

Code: Select all

; Map Alt+Wheel to do Ctrl+Wheel
!WheelUp::^WheelUp
!WheelDown::^WheelDown
The script works well, but I recently found that it is not working in one of my application (or maybe also not working in other application that I haven't test yet). To be specific, It is not working in PDFelement, where I want to zoom in for reading PDF file.

Re: AHK script not working in some application

Posted: 29 Dec 2023, 14:24
by Xtra
Welcome,

If an application is running elevated and the script is not elevated sending keys to that app will not work.
You can do a quick test by running your script as admin (right click script > Run as Administrator) to elevate it and see if your script works.

Re: AHK script not working in some application

Posted: 30 Dec 2023, 07:06
by php
Xtra wrote:
29 Dec 2023, 14:24
Welcome,

If an application is running elevated and the script is not elevated sending keys to that app will not work.
You can do a quick test by running your script as admin (right click script > Run as Administrator) to elevate it and see if your script works.
Thank you. I just upgrade the ATK to v2.0 and run the script, now it works well without running script as Administrator.