Code:
#include <GuiConstants.au3>
#include <File.au3>
If Not FileExists("C:\temp\Realmlist.ini") Then
MsgBox(0, "Configuration not setup or saved file was deleted", "Please set this up, make sure it is ALL correct, or this will not work properly.")
$1 = InputBox("Directory", "What is the directory for your blizzard server wow file?")
$2 = InputBox("Directory", "What is the directory for your blizzard server realmlist.wtf?")
$3 = InputBox("Directory", "What is the directory for your private server wow file?")
$4 = InputBox("Directory", "What is the directory for your private server realmlist.wtf?")
$5 = InputBox("Realmlist", "What is the realmlist.wtf info for your private server?")
IniWrite("C:\Temp\Realmlist.ini", "blizz", "wow file", $1)
IniWrite("C:\Temp\Realmlist.ini", "blizz", "realmlist.wtf", $2)
IniWrite("C:\Temp\Realmlist.ini", "private server", "wow file", $3)
IniWrite("C:\Temp\Realmlist.ini", "private server", "realmlist.wtf", $4)
IniWrite("C:\Temp\Realmlist.ini", "private server", "name", $5)
Else
If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(36, "Settings", "Use same settings as before?")
Select
Case $iMsgBoxAnswer = 6 ;Yes
$1 = IniRead("C:\Temp\Realmlist.ini","blizz","wow file","")
$2 = IniRead("C:\Temp\Realmlist.ini", "blizz", "realmlist.wtf","")
$3 = IniRead("C:\Temp\Realmlist.ini", "private server", "wow file","")
$4 = IniRead("C:\Temp\Realmlist.ini", "private server", "realmlist.wtf","")
$5 = IniRead("C:\Temp\Realmlist.ini", "private server", "name","")
Case $iMsgBoxAnswer = 7 ;No
$1 = InputBox("Directory", "What is the directory for your blizzard server wow file?")
$2 = InputBox("Directory", "What is the directory for your blizzard server realmlist.wtf?")
$3 = InputBox("Directory", "What is the directory for your private server wow file?")
$4 = InputBox("Directory", "What is the directory for your private server realmlist.wtf?")
$5 = InputBox("Realmlist", "What is the realmlist.wtf info for your private server?")
IniWrite("C:\Temp\Realmlist.ini", "blizz", "wow file", $1)
IniWrite("C:\Temp\Realmlist.ini", "blizz", "realmlist.wtf", $2)
IniWrite("C:\Temp\Realmlist.ini", "private server", "wow file", $3)
IniWrite("C:\Temp\Realmlist.ini", "private server", "realmlist.wtf", $4)
IniWrite("C:\Temp\Realmlist.ini", "private server", "name", $5)
EndSelect
EndIf
GuiCreate("WoW Realm Selector", 329, 74,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
GuiSetIcon($1, 0)
$Button_1 = GuiCtrlCreateButton("Emulation WoW", 10, 10, 150, 50)
$Button_2 = GuiCtrlCreateButton("Original WoW", 180, 10, 140, 50)
GuiSetState()
Do
$msg = GUIGetMsg()
Select
Case $msg= $Button_1
MsgBox(0,"Thank You!", "You have chosen to play your Private Server!")
_FileWriteToLine($4, 1, $5, 1)
Sleep(3000)
Run($3)
Case $msg= $Button_2
MsgBox(0,"Thank You!", "You have chosen to play in the Blizz Server!")
_FileWriteToLine($2, 1, "set realmlist us.logon.worldofwarcraft.com", 1)
Sleep(3000)
Run($1)
EndSelect
Until $msg = $GUI_EVENT_CLOSE or $msg = $Button_1 or $msg = $Button_2
the .exe is attached to this post.