Mapping mouse to scrolling

May 01, 2010 02:37 Mapping mouse to scrolling
I scripted a macro program that will remap mouse movement to scroll keys in winbolo

http://www.mediafire.com/download.php?kugygtmjiyd

Will only work if your scroll keys are keypad 8456

When in winbolo screen, hold right click and move mouse. This will move the scroll.

Middle click on the mouse triggers keypad 0, so if you want that to be pillview or tank view you can set the key in winbolo for that.


I tested this thing for a few hours, and was able to beat gameboy in 1x1 using this method for scroll and nothing else.

It is jittery though, and I am having trouble figuring out the solution.

Seems to work best if you move the mouse quickly and not hold it too long.

I am going to try a different approach I think, that triggers the scroll keys simply by right clicking on regions. This should be easy to implement and be more stable.
May 01, 2010 02:45
I only tested if this works on my computer which is running Windows Vista 32bit Home Edition, but pretty sure it will work on 98SE+

Oh, and in case you use auto-scroll, turn that off since it will mess it up
May 01, 2010 03:02
Here is the source for the script. It was compiled in AutoHotKey which is an open source app you can download

; Macro script for setting mouse click of center button to tank view in winbolo,
; and remapping mouse movement while holding right click to scroll keys
;
; Scripted by underdog
;

IfWinActive, Winbolo
{
SetBatchLines -1
SleepDuration = 1
TimePeriod = 3
MButton::Numpad0
~RButton::
MouseGetPos, begin_x, begin_y
while GetKeyState("RButton")
{
MouseGetPos, x, y
if (x >= begin_x + 15)
{
if (!rightkey)
{
Send {Numpad4 up}{Numpad6 down}
;begin_x = begin_x + 32
rightkey := 1
leftkey := 0
}
}
if (x <= begin_x - 15)
{
if (!leftkey)
{
Send {Numpad6 up}{Numpad4 down}
;begin_x = begin_x - 32
leftkey := 1
rightkey := 0
}
}
if (y >= begin_y + 15)
{
if (!downkey)
{
Send {Numpad8 up}{Numpad5 down}
downkey := 1
upkey := 0
}
}
if (y <= begin_y - 15)
{
if (!upkey)
{
Send {Numpad5 up}{Numpad8 down}
upkey := 1
downkey := 0
}
}
if (x >= begin_x AND x < begin_x + 15)
{
if (!rightswitch)
{
Send {Numpad6 up}
rightswitch := 1
rightkey := 0
leftkey := 0
}
}
if (y >= begin_y AND y < begin_y + 15)
{
if (!upswitch)
{
Send {Numpad8 up}
upswitch := 1
upkey := 0
downkey := 0
}
}
if (x < begin_x AND x > begin_x - 15)
{
if (!leftswitch)
{
Send {Numpad4 up}
leftswitch := 1
rightkey := 0
leftkey := 0
}
}
if (y < begin_y AND y > begin_y - 15)
{
if (!downswitch)
{
Send {Numpad5 up}
downswitch := 1
upkey := 0
downkey := 0
}
}
}
if (rightkey)
{
Send {Numpad6 up}
rightkey :=0
}
if (leftkey)
{
Send {Numpad4 up}
leftkey :=0
}
if (downkey)
{
Send {Numpad5 up}
downkey :=0
}
if (upkey)
{
Send {Numpad8 up}
upkey :=0
}
if (rightswitch)
{
rightswitch := 0
}

if (leftswitch)
{
leftswitch := 0
}

if (upswitch)
{
upswitch := 0
}

if (downswitch)
{
downswitch := 0
}
return
}
May 01, 2010 06:00
Could just fire up the winbolo source and code this up as a option directly....

Min
May 02, 2010 14:47
Nice work ud!