I am trying to make a script for Fusion 360. Basically I want to make a hotkey where if I hold the key, e.g q then it would rotate vertically as long as I hold the key
I have made the version where it would rotate everytime I press the key manually but I am stuck when I try to do it continuously
The program itself needs a shift+middle mouse to be hold before I can move the mouse
I have read the tutorial and tried
Code: Select all
q::
MouseGetPos, x, y
Send +{Mbutton down}
while GetKeyState("q","P")
{
Sleep, 10
MouseMove,0,-5,0,R
Send, {MButton up}
MouseMove,x,y,0
Sleep, 10
Send, +{MButton down}
Sleep, 10
}
Send, {MButton Up}
MouseMove,x,y,0
Return
Code: Select all
q::
MouseGetPos, x, y
Send +{Mbutton down}
Loop
{
Sleep, 10
if !GetKeyState("q", "P")
break
MouseMove,0,-5,0,R
Sleep, 100
Send, {MButton up}
Sleep, 100
MouseMove,x,y,0
Sleep, 10
Send, +{MButton down}
Sleep, 100
}
Send, {MButton Up}
Return
Thank you beforehand