04-24-2017, 11:21 PM
It was hard, but I think I got it!
Here are my scripts, I made two of them because one has to be toggled on/off:
CoordMode, Mouse, Screen
XButton1::
{
mousegetpos, start_x
while getkeystate("XButton1", "p")
{
mousegetpos, current_x
if (current_x > start_x + 10)
{
if (press = "")
{
press := "Right"
sendinput, {Right down}
}
else if (press = "Left")
{
press := "Right"
sendinput, {Left up}
sendinput, {Right down}
}
}
else if (current_x < start_x - 10)
{
if (press = "")
{
press := "Left"
sendinput, {Left down}
}
else if (press = "Right")
{
press := "Left"
sendinput, {Right up}
sendinput, {Left down}
}
}
else if (current_x < start_x + 10) and (current_x > start_x - 10)
{
if (press = "Right")
{
sendinput, {Right up}
}
else if (press = "Left")
{
sendinput, {Left up}
}
press := ""
}
}
}
return
WheelUp::
Send {Up}
return
WheelDown::
Send {Down}
return
end::exitapp
It allows me to press arrow left or right when I hold my 3rd mouse button and move my mouse lateraly. And it when I scroll up or down it uses the up/down arrow keys.
Rbutton::o
Lbutton::i
MButton::Suspend, Toggle
Esc::ExitApp
This one is pretty self-explainatory, my left mouse click is remapped to the "i" key, and the right click to the "o" key. In my controls settings I'll bind them to triangle and circle. I can toggle this on/off by pressing my mouse's middle button and if there is an issue, pressing "Esc" will disable the script.
I'll be testing that in-game now, will tell you guys if it goes well.
Here are my scripts, I made two of them because one has to be toggled on/off:
CoordMode, Mouse, Screen
XButton1::
{
mousegetpos, start_x
while getkeystate("XButton1", "p")
{
mousegetpos, current_x
if (current_x > start_x + 10)
{
if (press = "")
{
press := "Right"
sendinput, {Right down}
}
else if (press = "Left")
{
press := "Right"
sendinput, {Left up}
sendinput, {Right down}
}
}
else if (current_x < start_x - 10)
{
if (press = "")
{
press := "Left"
sendinput, {Left down}
}
else if (press = "Right")
{
press := "Left"
sendinput, {Right up}
sendinput, {Left down}
}
}
else if (current_x < start_x + 10) and (current_x > start_x - 10)
{
if (press = "Right")
{
sendinput, {Right up}
}
else if (press = "Left")
{
sendinput, {Left up}
}
press := ""
}
}
}
return
WheelUp::
Send {Up}
return
WheelDown::
Send {Down}
return
end::exitapp
It allows me to press arrow left or right when I hold my 3rd mouse button and move my mouse lateraly. And it when I scroll up or down it uses the up/down arrow keys.
Rbutton::o
Lbutton::i
MButton::Suspend, Toggle
Esc::ExitApp
This one is pretty self-explainatory, my left mouse click is remapped to the "i" key, and the right click to the "o" key. In my controls settings I'll bind them to triangle and circle. I can toggle this on/off by pressing my mouse's middle button and if there is an issue, pressing "Esc" will disable the script.
I'll be testing that in-game now, will tell you guys if it goes well.

