Mikhail22 / drag-scroll--autohotkey

AHK scripts
42 stars 8 forks source link

Application exclude #2

Closed panbeep closed 3 years ago

panbeep commented 5 years ago

Hi, thank you for the great script! It makes my wacom pen very usable. :) Is there a way to exclude this script so it doesn't work in certain applications?

Mikhail22 commented 4 years ago

Hi, thank you for the great script! It makes my wacom pen very usable. :) Is there a way to exclude this script so it doesn't work in certain applications?

You're welcome! Yes, you can use Autohotkey's #If directive. Google for "creating context-sensitive hotkeys". https://www.autohotkey.com/docs/commands/_If.htm

You'll need to add something like this in the beginning of the script: #if not WinActive("ahk_exe yourapp.exe") So the script will be deactivated if this app is in focus. "yourapp.exe" is the name of application. Use window spy tool (right-click on AHK system tray icon and click "window spy") to find the names of active apps.

https://stackoverflow.com/questions/45552452/what-is-au3-spy-exe-where-can-i-find-it