I've got the following so far:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#MenuMaskKey vk07
#ifWinActive ahk_exe maya.exe
LShift:: return
Pan()
{
SendInput {MButton Down}
Loop
{
KeyWait, LShift, T0.01 ;Pan to Orbit
If not ErrorLevel
{
SendInput {MButton Up}
if (Orbit())
return true
}
KeyWait, MButton, T0.01 ;Pan to Exit
If not ErrorLevel
{
SendInput {MButton Up}
return true
}
}
}
Orbit()
{
SendInput {LButton Down}
Loop
{
KeyWait, LShift, D T0.01 ;Orbit to Pan
If not ErrorLevel
{
SendInput {LButton Up}
if (Pan())
return true
}
KeyWait, MButton, T0.01 ;Orbit to Exit
If not ErrorLevel
{
SendInput {LButton Up}
return true
}
}
}
MButton::
if (GetKeyState LShift, P)
{
SendInput {LAlt Down}
if Pan()
{
SendInput {LAlt Up}
}
}
else
{
SendInput {LAlt Down}
if Orbit()
{
SendInput {LAlt Up}
}
}