Last month blah blah angry blah blah poor blah blah no time blah.. blah, and I decided to write a script for my couch chilling with a notebook (and I do it most of the time lately).
Basically, it remaps Right Mouse somewhere near your movement and skill keys but instead of holding it like you do on mouse (unless its dungeon and dragons online xd) you can toggle it( to lock the camera)
It is a very light weight and basic autohotkeys script.
Code: Select all
#IfWinActive, World of Warcraft
CursorFree:=true
CapsLock::
{
Loop
{
GetKeyState, state, CapsLock, P
if state = D
{
if (CursorFree=true and A_Index<=1)
{
SendInput, {RButton Down}
}
}
else if state = U
{
if (CursorFree=true)
{
CursorFree:=false
break
}
else if (CursorFree=false)
{
CursorFree:=true
SendInput, {RButton up}
break
}
}
}
}
return
there are some extras that I use
Code: Select all
f::
{
if (CursorFree=false)
{
sendinput, {RButton up}{f}
CursorFree:=true
}else if (CursorFree=true)
sendinput, {LButton}{f}
}
return
you can call it right out of the locked cam state, not only that but the second key press will click it. And since script tracks basic toggle, you can lock it right away.
I not sure if anyone will ever need it, but may bring new ideas.
P.S: You may even do solid PvE healing with similar macro and at some level it even brings some improvement over classic mouse mechanics.
for AHK enthusiasts read inside
[hide]Problem was that you can't right click and move cam while hovering over UI, but if you move mouse to the clear spot before sending click, you can bring cursor right back.
Ive done it as follows:
Code: Select all
if (CursorFree=true and A_Index<=1)
{ ;if cursor is free takes one sample:
MouseGetPos, xpos, ypos ;mouse position and window dimensions
WinGetPos, X, Y, Width, Height, World of Warcraft
MouseMove, Width/2, Height/2 ;move to the middle of the screen
SendInput, {RButton Down}
}
Code: Select all
else IF (CursorFree=false) ;Right mouse is pressed, cursor hidden in the center
{
SendInput, {RButton up}
MouseMove, xpos, ypos
CursorFree:=true
break
}
as follows
Code: Select all
GetKeyState, state, CapsLock, P
if state = D ;Key is pressed down:
{
if (CursorFree=true and A_Index<=1){ ;if cursor is free takes one sample:
MouseGetPos, xpos, ypos ;mouse position and window dimensions
WinGetPos, X, Y, Width, Height, World of Warcraft
}
else if (CursorFree=true){
MouseMove, Width/2, Height/2 ;move center and start next loop
Loop
{
MouseGetPos, xpos2, ypos2 ;Get new mouse position
if (Width/2=xpos2 and Height/2=ypos2){ ;compare it with coordinates of center the screen
SendInput, {RButton Down} ;finally if they match, press down and break loop
Break
}
}
}
}