Help with MouseLook script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
smetana6666
Posts: 2
Joined: 14 Aug 2018, 20:53

Help with MouseLook script

14 Aug 2018, 21:07

Hey folks, I'm hoping to get some help. I poached an old script from Reddit that is used in the MMO Archeage. Credit to TitusCruentes on Reddit for his work. The script toggles a mode where the right mouse button is automatically pressed, so you don't need to keep it pressed while moving. Standard stuff, lots of games have similar scripts.

Here's the issue. While the script is active, I'm wanting to be able to remap the left and right mouse buttons for strafing. That way i can keep all movement on the mouse, no WASD required. I added two lines of remapping to the script and it works great. Problem is, the remapping carries over when the toggle is not active, so I cannot use the mouse to click on menus, chat, windows, etc.

I'm hoping somebody can have a look and see where I'm going wrong. How can I amend this script so that the remapping of the two mouse buttons is contigent on the "mouselook" toggle being active?

Here is the script.

; ArcheAge Mouselook Toggle ver. 1.2

#NoEnv
SendMode Input

#IfWinActive - ArcheAge

$XButton2::
If (Toggle := !Toggle)
Send {RButton Down}
Else
Send {RButton up}
Return

$!RButton::
if (Toggle)
{
Toggle := !Toggle
}
Send {RButton}
Return

~c::
~i::
~l::
~m::
~n::
~k::
~o::
~p::
~Enter::
if (Toggle)
{
Toggle := !Toggle
Send {RButton up}
}
Return

LButton::Left
RButton::Right


; #IfWinActive
smetana6666
Posts: 2
Joined: 14 Aug 2018, 20:53

Re: Help with MouseLook script

15 Aug 2018, 09:30

Anyone able to help? I'd sure appreciate it!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: pgarza and 127 guests