Page 1 of 1

Standardizing Pan and Zoom Between Apps

Posted: 29 Jul 2019, 05:03
by Mark Holley
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.

Re: Standardizing Pan and Zoom Between Apps

Posted: 29 Jul 2019, 17:37
by rommmcek
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

Re: Standardizing Pan and Zoom Between Apps

Posted: 29 Jul 2019, 18:32
by Mark Holley
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! :)

Re: Standardizing Pan and Zoom Between Apps

Posted: 29 Jul 2019, 22:21
by rommmcek
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.

Re: Standardizing Pan and Zoom Between Apps

Posted: 30 Jul 2019, 03:38
by Mark Holley
Thank you rommmcek; I appreciate your reply.