PDA

View Full Version : WoWTiler



Narcoz
03-03-2008, 12:05 PM
Hi!

Just wanted to submit yet another tool I've written for Multi-Boxing World of Warcraft: The WoWTiler.

What it does is that is takes all the World of Warcraft windows in the system and tiles them on the screen.

If you got 2 windows it tiles like this:

1 2

If you got 4 windows it tiles like this:

1 2
3 4

If you got 6 windows it tiles like this:

1 2 3
4 5 6

Hope you get the idea. Here is the AutoHotKey source:


--------------------------------------- WowTiler.ahk starts here -----------------------------------------


;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: Nacroz
;
; Script Function:
; This script attempts to tile all you world of warcraft windows
;

SetTitleMatchMode, 2
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
WindowName=World of Warcraft

WinGet, id, list,%WindowName%

ifLess,id,2,ExitApp

NrOfRows = % Floor(Sqrt(id))
NrOfCols = % Floor(Sqrt(id))
if Sqrt(id) <> Floor(Sqrt(id))
{
NrOfCols := NrOfCols + 1
}
if Sqrt(id) > (Floor(Sqrt(id)) + 0.5)
{
NrOfRows := NrOfRows + 1
}

xSizePerWindow = % Floor(A_ScreenWidth / NrOfCols)
ySizePerWindow = % Floor(A_ScreenHeight / NrOfRows)


row=0
col=0
Loop, %id%
{
this_id := id%A_Index%
xPos = % col * xSizePerWindow
yPos = % row * ySizePerWindow
WinMove, ahk_id %this_id%,, xPos, yPos, xSizePerWindow, ySizePerWindow
WinActivate, ahk_id %this_id%
col = % col + 1
if col > % (NrOfCols - 1)
{
col=0
row = % row + 1
}
}



--------------------------------------- WowTiler.ahk ends here -----------------------------------------


It should be fairly easy to extend this script for usage with several monitors, I've seen the commands in AHK for it but I havent done this yet coz this script was written to scratch my own itch and I just wanted to share.

Good Luck with the multi-WoW:ing!