NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; !! Pressing the ESCAPE key will terminate the script !!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Settings InitialSleepTimer = 500 ; How long to wait before the script will start launching and moving windows (in milliseconds) NumberOfWindows = 4 ; Number of windows to launch and position PathToDiablo2 = "C:\Users\Admin\Documents\Shortcuts\D2\Diablo II" ; This should be pointing to where your Diablo 2 shortcut is PathToMaphack = "C:\Users\Admin\Documents\Shortcuts\D2\BH" ; This should be pointing to your bh-injector shortcut. Needs to have " -o 0 -p " in the target field.
xCoordinate1 = 0 ; X coordinate of the top left corner of where you want the window positioned yCoordinate1 = 40 ; Y coordinate of the top left corner of where you want the window positioned
xCoordinate2 = 0 ; X coordinate of the top left corner of where you want the window positioned yCoordinate2 = 40 ; Y coordinate of the top left corner of where you want the window positioned
xCoordinate3 = 0 ; X coordinate of the top left corner of where you want the window positioned yCoordinate3 = 40 ; Y coordinate of the top left corner of where you want the window positioned
xCoordinate4 = 0 ; X coordinate of the top left corner of where you want the window positioned yCoordinate4 = 40 ; Y coordinate of the top left corner of where you want the window positioned
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Sleep, 500
Loop, %NumberOfWindows% { Run, %PathToDiablo2% Sleep, 1500 }
i = 1 WinGet, id, list, Diablo II
Loop, %id% {
if (i > NumberOfWindows) {
break
}
this_id := id%A_Index%
if (i == 1)
{
WinMove ahk_id %this_id%, , %xCoordinate1%, %yCoordinate1%
}
else if (i == 2)
{
WinMove ahk_id %this_id%, , %xCoordinate2%, %yCoordinate2%
}
else if (i == 3)
{
WinMove ahk_id %this_id%, , %xCoordinate3%, %yCoordinate3%
}
else if (i == 4)
{
WinMove ahk_id %this_id%, , %xCoordinate4%, %yCoordinate4%
}
WinActivate ahk_id %this_id%
i += 1
Sleep, 200
}
Run, %PathToMaphack%
ExitApp
Esc::ExitApp