AHK script not working in some application

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
php
Posts: 7
Joined: 29 Dec 2023, 05:45

AHK script not working in some application

29 Dec 2023, 05:57

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.
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: AHK script not working in some application

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.
php
Posts: 7
Joined: 29 Dec 2023, 05:45

Re: AHK script not working in some application

30 Dec 2023, 07:06

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.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 181 guests