[edit - see below]
Does your existing code work now? Turning on and off the hotkey shouldn't make much difference to whether it works or not, just that it won't trigger at times when you might not want it.
Quote:
Hotkey, KeyName [, Label, Options]
So you would use something like:
Code:
$!MButton::
if WinActive("ahk_class 3DSMAX")
{
Send, {MButton down}
Hotkey, $!MButton up, Label, On
}
Return
Label:
Send, {MButton up}
Hotkey, $!MButton up, Label, Off
Return
If your code's not working, try to be more specific about what happens - I don't have the program to test it out.
Edit: I'm pretty sure it's not working as I was trying it out in internet explorer. Sorry I'm not sure why exatly. Best thing to do is start a new thread in the help forum so it gets more attention.
This was what I tried last for alt and middle button:
Code:
#persistent
#InstallKeybdHook
#InstallMouseHook
return
*$!MButton::
MouseClick, Middle,,,,, D
Hotkey, *!MButton up, Label, On
Return
Label:
MouseClick, Middle,,,,, U
Hotkey, *!MButton up, Label, Off
Return