OK guys, I was able to fix the script and it is working now. It fixes the edge panning!

The only cons is that it applies to all windows if they are active so it is better to close the script if your are not playing BG and be aware if you ALT+TAB to windows. I tried hardly to trigger it only for BG but I was not able to do it. It also doesn't fix the automatic centering on the character.

The script does this: if you move your mouse cursor to the right edge of monitor, it presses D, if to the left, it presses A, if to the top, it presses W, if to the bottom, it presses S.

How to use it:
1. Install app AutoHotkey
2. Make a new text file, copy there the script and rename the extension to ahk
3. Run the file

If the script is running, you can see it near the clock with other icons of apps. Right click on it and Exit and you will close the script.

Here is the script:


WinGetPos, X, Y, Width, Height, A

#Persistent
SetTimer, WatchCursor, 10
return

WatchCursor:
MouseGetPos, MouseX, MouseY

if (MouseY >= Y + Height - 1)
{
SendInput, {s}
}

if (MouseY <= 0)
{
SendInput, {w}
}

if (MouseX <= 0)
{
SendInput, {a}
}

if (MouseX >= A_ScreenWidth - 1)
{
SendInput, {d}
}
return