What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Standalone] WoW Starter & Window Positioner

Nesox

Well-Known Member
Joined
Jan 15, 2010
Messages
1,563
Reaction score
48


I wrote this today because i felt it was annoying to start so many instances of wow and line them up the way i want them.

Usage:
Line up the windows as you want them example:




Press "Dump windows to disk"


Done!

Now you can press "Position Windows" and it will start them line them up and resize them as they were when you pressed "Dump windows to disk"


Enjoy ;)
 

Attachments

Last edited:
Thanks for the contribution!

Ironically, I solved the same problem earlier this week. However, my solution was PowerShell which is built into Windows.

This will launch however many WoWclients you want, position them where you specify on the screen, and log you into each account you use. All the 'configuration' happens in the last few lines of the file.

I'm inlining the code in case anyone wants it (since the forum disallows files with the name .ps1 which is the required PowerShell extension.)
Code:
# Launch5WoW.ps1
#
# WARNING:
#   THIS FILE CONTAINS YOUR WOW ACCOUNT INFORMATION.  Protect it well.
#   You will need to edit this information at the bottom of this file.
#
# Install WASP from:
#     https://wasp.codeplex.com/
#
# WASP is a Zip file, (for Win7) just move the DLL contained inside into:
#     C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WASP\WASP.dll.
#
# Create a shortcut linking to this file:
#  	powershell.exe "C:\Games\Launch5WoW.ps1" 			(for example)
#	powershell.exe -noexit "C:\Games\Launch5WoW.ps1" 	(if you need to debug)
#
Import-Module WASP

$processName = 'C:/Games/World of Warcraft/WoW.exe'
$sleepTimeForWindowToAppear = 5
$sleepTimeForPasswordPromptToAppear = 0


function LaunchWoWWithConfig
{
	param ([string]$configFileName, [string]$account, [string]$password, [int]$posLeft, [int]$posTop)
	
	$WoWDir = (Get-ChildItem $processName).DirectoryName
	
	$processStartInfo = New-Object System.Diagnostics.ProcessStartInfo
	$processStartInfo.FileName = (Get-Command $processName).Definition
	$processStartInfo.WorkingDirectory = $WoWDir
	$processStartInfo.Arguments = '-config "' + $WoWDir + '\WTF\' + $configFileName + '"'
	$processStartInfo.UseShellExecute = $false

	echo "Launching $account"
	$process = [System.Diagnostics.Process]::Start($processStartInfo)
	
	Sleep $sleepTimeForWindowToAppear
	Set-WindowPosition -Left $posLeft -Top $posTop -Window $process.MainWindowHandle

	Sleep $sleepTimeForPasswordPromptToAppear
	Select-Window $process | Send-Keys "$account`t$password`n"
	
	#return ($process)
}


#-----
# Edit these lines as you need...
# * Config-whatever.wtf contains whatever directives you need for the configuration.
#   Probably the most important is the line: SET gxResolution "600x450" (or whatever)
# * Your BNET_ACCOUNT name
# * Your BNET_ACCOUNT PASSWORD
# * Left position for window
# * Top position for window
#
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME1" "PASSWORD1" 695 1
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME2" "PASSWORD2" 80 540
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME3" "PASSWORD3" 80 1
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME4" "PASSWORD4" 695 540
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME5" "PASSWORD5" 1310 1

As the comments indicate, you will also need to install the WASP module for Powershell which is available from Microsoft's codeplex.

With one click on an icon, it now launches all my WoWs and logs me into the appropriate accounts. You may need to adjust the 'sleepTime*' variables if your machine is slower than mine.


cheers,
chinajade
 
Last edited:
Thanks for the contribution!

Ironically, I solved the same problem earlier this week. However, my solution was PowerShell which is built into Windows.

This will launch however many WoWclients you want, position them where you specify on the screen, and log you into each account you use. All the 'configuration' happens in the last few lines of the file.

I'm inlining the code in case anyone wants it (since the forum disallows files with the name .ps1 which is the required PowerShell extension.)
Code:
# Launch5WoW.ps1
#
# WARNING:
#   THIS FILE CONTAINS YOUR WOW ACCOUNT INFORMATION.  Protect it well.
#   You will need to edit this information at the bottom of this file.
#
# Install WASP from:
#     https://wasp.codeplex.com/
#
# WASP is a Zip file, (for Win7) just move the DLL contained inside into:
#     C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WASP\WASP.dll.
#
# Create a shortcut linking to this file:
#  	powershell.exe "C:\Games\Launch5WoW.ps1" 			(for example)
#	powershell.exe -noexit "C:\Games\Launch5WoW.ps1" 	(if you need to debug)
#
Import-Module WASP

$processName = 'C:/Games/World of Warcraft/WoW.exe'
$sleepTimeForWindowToAppear = 5
$sleepTimeForPasswordPromptToAppear = 0


function LaunchWoWWithConfig
{
	param ([string]$configFileName, [string]$account, [string]$password, [int]$posLeft, [int]$posTop)
	
	$WoWDir = (Get-ChildItem $processName).DirectoryName
	
	$processStartInfo = New-Object System.Diagnostics.ProcessStartInfo
	$processStartInfo.FileName = (Get-Command $processName).Definition
	$processStartInfo.WorkingDirectory = $WoWDir
	$processStartInfo.Arguments = '-config "' + $WoWDir + '\WTF\' + $configFileName + '"'
	$processStartInfo.UseShellExecute = $false

	echo "Launching $account"
	$process = [System.Diagnostics.Process]::Start($processStartInfo)
	
	Sleep $sleepTimeForWindowToAppear
	Set-WindowPosition -Left $posLeft -Top $posTop -Window $process.MainWindowHandle

	Sleep $sleepTimeForPasswordPromptToAppear
	Select-Window $process | Send-Keys "$account`t$password`n"
	
	#return ($process)
}


#-----
# Edit these lines as you need...
# * Config-whatever.wtf contains whatever directives you need for the configuration.
#   Probably the most important is the line: SET gxResolution "600x450" (or whatever)
# * Whatever *.wtf file you want to use
#      For instance, Config-6up.wtf is a normal Config.wtf with the additional line:
# 			SET gxResolution "600x450"
# * Your WOW ACCOUNT name
# * Your WOW ACCOUNT PASSWORD
# * Left position for window
# * Top position for window
#
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME1" "PASSWORD1" 695 1
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME2" "PASSWORD2" 80 540
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME3" "PASSWORD3" 80 1
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME4" "PASSWORD4" 695 540
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME5" "PASSWORD5" 1310 1

As the comments indicate, you will also need to install the WASP module for Powershell which is available from Microsoft's codeplex.

With one click on an icon, it now launches all my WoWs and logs me into the appropriate accounts. You may need to adjust the 'sleepTime*' variables if your machine is slower than mine.


cheers,
chinajade

Nice, didn't know you could use PowerShell for that :)
 
yeehaw! thanks to both of you!! as i cannot code anything i googled hours and hours for a solution. never found anything. and now i have two solutions
 
Reuploaded it.
No longer requires you to select the path to wow, it does that with magic now! :o
 
Last edited:
This is awesome, now if only I had more than just one account... :P
 
want this at home, just writing this to get it in my quick links :d
 
Thanks for the contribution!

Ironically, I solved the same problem earlier this week. However, my solution was PowerShell which is built into Windows.

This will launch however many WoWclients you want, position them where you specify on the screen, and log you into each account you use. All the 'configuration' happens in the last few lines of the file.

I'm inlining the code in case anyone wants it (since the forum disallows files with the name .ps1 which is the required PowerShell extension.)
Code:
# Launch5WoW.ps1
#
# WARNING:
#   THIS FILE CONTAINS YOUR WOW ACCOUNT INFORMATION.  Protect it well.
#   You will need to edit this information at the bottom of this file.
#
# Install WASP from:
#     https://wasp.codeplex.com/
#
# WASP is a Zip file, (for Win7) just move the DLL contained inside into:
#     C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WASP\WASP.dll.
#
# Create a shortcut linking to this file:
#  	powershell.exe "C:\Games\Launch5WoW.ps1" 			(for example)
#	powershell.exe -noexit "C:\Games\Launch5WoW.ps1" 	(if you need to debug)
#
Import-Module WASP

$processName = 'C:/Games/World of Warcraft/WoW.exe'
$sleepTimeForWindowToAppear = 5
$sleepTimeForPasswordPromptToAppear = 0


function LaunchWoWWithConfig
{
	param ([string]$configFileName, [string]$account, [string]$password, [int]$posLeft, [int]$posTop)
	
	$WoWDir = (Get-ChildItem $processName).DirectoryName
	
	$processStartInfo = New-Object System.Diagnostics.ProcessStartInfo
	$processStartInfo.FileName = (Get-Command $processName).Definition
	$processStartInfo.WorkingDirectory = $WoWDir
	$processStartInfo.Arguments = '-config "' + $WoWDir + '\WTF\' + $configFileName + '"'
	$processStartInfo.UseShellExecute = $false

	echo "Launching $account"
	$process = [System.Diagnostics.Process]::Start($processStartInfo)
	
	Sleep $sleepTimeForWindowToAppear
	Set-WindowPosition -Left $posLeft -Top $posTop -Window $process.MainWindowHandle

	Sleep $sleepTimeForPasswordPromptToAppear
	Select-Window $process | Send-Keys "$account`t$password`n"
	
	#return ($process)
}


#-----
# Edit these lines as you need...
# * Config-whatever.wtf contains whatever directives you need for the configuration.
#   Probably the most important is the line: SET gxResolution "600x450" (or whatever)
# * Your BNET_ACCOUNT name
# * Your BNET_ACCOUNT PASSWORD
# * Left position for window
# * Top position for window
#
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME1" "PASSWORD1" 695 1
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME2" "PASSWORD2" 80 540
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME3" "PASSWORD3" 80 1
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME4" "PASSWORD4" 695 540
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME5" "PASSWORD5" 1310 1

As the comments indicate, you will also need to install the WASP module for Powershell which is available from Microsoft's codeplex.

With one click on an icon, it now launches all my WoWs and logs me into the appropriate accounts. You may need to adjust the 'sleepTime*' variables if your machine is slower than mine.


cheers,
chinajade

Going to try this one out... one question, how can I handle multiple accounts on one b-net account (e.g. WOW1, WOW2,...)? May I use a prefix or something like that?
 
Ilja Rogoff said:
Going to try this one out... one question, how can I handle multiple accounts on one b-net account (e.g. WOW1, WOW2,...)? May I use a prefix or something like that?

<blush> None of my accounts are set up that way, so I've no way to test it.

You would have to fiddle with the Send-Keys "$account`t$password`n" line. Maybe make it read something like:
Send-Keys "BNET_ACCOUNT_NAME`t$account`t$password`n"

The "`n" is WASPs way of sending a 'newline' (i.e., hitting enter). Similarly "`t" means 'tab'.

If you can send me a screenshot of what entries (and their order) is required for that configuration, perhaps I could give it a shot.

Sorry I couldn't help further with it.

cheers,
chinajade
 
ah, thanks... will try it as I have a little time.
btw: when storing login data in wow-client (checkbox at login-screen), the information is saved in the config.wtf this way:

SET accountList "WoW1|!WoW2|WoW3|"

the active wow-login is marked with an exclamation

can this be helpful?
 
Ilja Rogoff said:
the active wow-login is marked with an exclamation

can this be helpful?

That's certainly another way to solve the problem. For the line...
LaunchWoWWithConfig "Config-6up.wtf" "BNET_ACCOUNT_NAME1" "PASSWORD1" 695 1

Create distinct Config-whatever.wtf file for each account, and substitute appropriately into that line.

LaunchWoWWithConfig "Config-BNet1.wtf" "BNET_ACCOUNT_NAME1" "PASSWORD1" 695 1
LaunchWoWWithConfig "Config-BNet2.wtf" "BNET_ACCOUNT_NAME1" "PASSWORD1" 695 1

Its not a solution I'd favor, as distinct Config-whatever.wtf files represent more maintenance and things to go check when things go wrong.

The ideal solution would have Nesox's tool add login capability, then you could toss my solution. <smiles and looks at Nesox.>

cheers,
chinajade
 
DaveLovesHonda said:
Any chance a relogger could be added to this?

No, the whole point was not to have another process running (i.e., be a relogger. :) )

There are several reloggers available...
...are two. Both worked fine last I tried them. And, someone even has a relogger as an HB 'plugin'.

I'm not a user of reloggers because I never bot unattended--keeping an eye on them as I do other things.

cheers,
chinajade
 
This is great, thx chinajade. I am a lil bit in the dark and need some help please. Everything works great up to the point where i need to get it to enter my usernames and passwords. How to I get that configured? It loads all my windows perfectly and positions it 100%, but get errors when it needs to enter the usernames and passwords.

This is the error that I get.

Send-Keys : Cannot bind parameter 'Window'. Cannot convert the "ACCOUNTNAME PASSWORD
" value of type "System.String" to type "Huddled.Wasp.WindowHandle".
At line:43 char:36
+ Select-Window $process | Send-Keys <<<< "$account`t$password`n"
+ CategoryInfo : InvalidArgument: (:) [Send-Keys], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Huddled.Wasp.Commands.SendKeysCommand

Oh joy NVM, I got it to work. I was running an outdated version of Wasp with Powershell 2.0 - Installed the new Wasp and it is working fine.

Thx for making my life easier chinajade. You rock +rep
 
Last edited:
Man the powershell script is great, I didn't even know anything about it until this post. The positioner was great in giving me the dimensions
I needed to plug in to the power script and config file.

I want to shoot two ideas , Is there a way to have the positioner just position the windows and maybe save profiles.
I would love to use the powershell script as the initial process of setting up and logging in. But sometimes, depending on my focus or what I am doing, I would
like to be able to able to rearrange the windows, maybe move them to a different display. It would be nice if we could position the HB windows as well.

Also, been playing around(without much success as of yet) with the send-click command for WASP to actually login the toon as well(yes I am that lazy). no such luck
yet because you need the mouse coordinates of that specific window, if anyone has any ideas on that or want to take a shot out it that would be awesome.

I like the Idea of using the powershell script because it is open sourced. I am sure there is a way to set it up to( maybe would take another script) that would check to see
if those process were running and to start them again if they were not. I am sure a genius could even use wasp to start up HB with the appropriate settings.
 
Back
Top