PDA

View Full Version : AutoHotKey Lightwave Script and Vista



JGary
09-13-2007, 01:08 PM
So, I use a Wacom tablet and have my beloved AutoHotKey script I found here on the forums (not sure who wrote it) that allows me to use Maya style navigation in LW (Maya's navigation hotkeys work much more fluidly with a tablet pen). I just moved over to Vista and noticed that the scripts right button functionality no longer works correctly with the OS. I think the tablet PC drivers on Vista are causing the trouble, but cannot figure out how to disable it, so I modified the script so that the alt + right button combo (!RButton) now uses alt + fourth button (!XButton1). You have to re-map your right click button to the fourth click button in the Wacom control panel to use this script. Here's the modified script below in case someone else needs it.

50285

#SingleInstance force
SetTitleMatchMode, 2

/*
Lightwave Viewport Navigation - AltPlusMinus!

Alt+LMB - Rotate View (Standard LW combo)
Alt+MMB - Zoom View
Alt+RMB - Pan View
WheelUp - Zoom In
WheelDown - Zoom Out
*/

#IfWinActive Modeler ahk_class WMgrBasic

!XButton1::
Send ^!{LButton Down}
KeyWait XButton1
Send ^!{LButton Up}
return


XButton1::
Send +{RButton Down}
KeyWait XButton1
Send +{RButton Up}
return


!MButton::
Send +!{LButton Down}
KeyWait MButton
Send +!{LButton Up}
return


*WheelUp::
Send {.}
return

*WheelDown::
Send {,}
return

XButton1::RButton

#IfWinActive LightWave ahk_class WMgrBasic




!XButton1:: ;When user presses Alt+MMB,
Send ^!{LButton Down} ;Send 'Ctrl+Alt+LMB pressed'
KeyWait XButton1 ;Wait until MMB is released
Send ^!{LButton Up} ;Then send 'Ctrl+Alt+LMB released'
return


XButton1::
Send +{RButton Down}
KeyWait XButton1
Send +{RButton Up}
return


!MButton::
Send +!{LButton Down}
KeyWait MButton
Send +!{LButton Up}
return



*WheelUp::
Send {.}
return

*WheelDown::
Send {,}
return