Standardizing Pan and Zoom Between Apps

Get help with using AutoHotkey and its commands and hotkeys
Mark Holley
Posts: 4
Joined: 29 Jul 2019, 04:33

Standardizing Pan and Zoom Between Apps

29 Jul 2019, 05:03

Hello. I'm trying to use AutoHotKey to make panning and zooming in Adobe software more like Blender. This script works for Illustrator, InDesign, and Acrobat, but not Photoshop for some reason:

Code: Select all

#SingleInstance ignore
#IfWinActive ahk_exe Photoshop.exe
{

;Switches Wheel to AltWheel
WheelUp::!WheelUp
WheelDown::!WheelDown

;Middle Mouse Button activates hand tool dragging.
MButton::
Send, {Space down}{LButton down}
KeyWait, MButton
Send, {LButton up}{Space up}
Return
}
I use the same script for all four programs. For some reason, Photoshop doesn't behave properly. Sometimes, I'll notice the drop down menu items being selected as if I had pressed alt, and then I can cycle through them with the scroll wheel. If I had to guess it would be something to do with timing, but I'm brand new so I'm not entirely sure.

All Adobe programs are CC and updated yesterday. Windows 10 Pro.
User avatar
rommmcek
Posts: 1123
Joined: 15 Aug 2014, 15:18

Re: Standardizing Pan and Zoom Between Apps

29 Jul 2019, 17:37

Try this guess (one for all three):

Code: Select all

#SingleInstance Force
GroupAdd, PanZoom, ahk_exe Photoshop.exe
GroupAdd, PanZoom, ahk_exe InDesign.exe  ; This line and next two below are pseudo. Replace with correct once!
GroupAdd, PanZoom, ahk_exe Acrobat.exe
GroupAdd, PanZoom, ahk_exe Adobe.exe
Return

#IfWinActive ahk_group PanZoom
;Switches Wheel to AltWheel
WheelUp::!WheelUp
WheelDown::!WheelDown

;Middle Mouse Button activates hand tool dragging.
MButton::
    Send, {Space down}{LButton down}
    KeyWait, MButton
    Send, {LButton up}{Space up}
Return
#IfWinActive
Mark Holley
Posts: 4
Joined: 29 Jul 2019, 04:33

Re: Standardizing Pan and Zoom Between Apps

29 Jul 2019, 18:32

That's definitely more elegant than my existing script, so I'm using it. Unfortunately, the Photoshop zoom is still buggy for me. Getting AHK to replace Mousewheel with AltMousewheel in Photoshop doesn't seem to be easy.

Thank you though! :)
User avatar
rommmcek
Posts: 1123
Joined: 15 Aug 2014, 15:18

Re: Standardizing Pan and Zoom Between Apps

29 Jul 2019, 22:21

You can try:

Code: Select all

WheelUp::
WheelDown::Send, !{%A_ThisHotkey%}
or

Code: Select all

WheelUp::
WheelDown::Send, {Alt down}{%A_ThisHotkey%}{Alt Up}
Have no such apps to make better code.
Mark Holley
Posts: 4
Joined: 29 Jul 2019, 04:33

Re: Standardizing Pan and Zoom Between Apps

30 Jul 2019, 03:38

Thank you rommmcek; I appreciate your reply.

Return to “Ask For Help”

Who is online

Users browsing this forum: aifritz, asdsk9skdsdas, c7aesa7r, Google [Bot] and 35 guests