meinst du jetzt realmlist ändern oder realm? verstehe dich leider nicht so ganz. wenn du einen REALMLIST changer haben willst, dann hier ->
#include <GUIConstants.au3>
#include <File.au3>
$RealmlistLocation = FileOpenDialog("Select realmlist.wtf", RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft", "InstallPath"), "WoW Realmlist File (*.wtf)")
$OpenRealmlist = FileOpen($RealmlistLocation, 0)
$RealmListLine = FileReadLine($OpenRealmlist, 1)
$CurrentRealmList = StringTrimLeft($RealmListLine, 14)
GUICreate("WoW Realmlist Changer", 230, 92, 193, 115)
GUICtrlCreateLabel("Current Realmlist:", 8, 12, 86, 17)
GUICtrlCreateLabel("New Realmlist:", 8, 36, 74, 17)
$Input1 = GUICtrlCreateInput($CurrentRealmList, 96, 8, 121, 21)
$Input2 = GUICtrlCreateInput("", 96, 32, 121, 21)
$SetRealmlist = GUICtrlCreateButton("Set Realmlist", 8, 56, 211, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $SetRealmlist
SetRealmlist()
EndSwitch
WEnd
Func SetRealmlist()
_FileWriteToLine($RealmlistLocation, 1, "set realmlist " & GUICtrlRead($Input2), 1)
If @error = 0 Then
MsgBox(0, "Realmlist Changed", "New Realmlist set to " & GUICtrlRead($Input2))
EndIf
EndFunc
edit: hier mal das selber für den Realm namen:
#include <GUIConstants.au3>
#include <File.au3>
$RealmLocation = FileOpenDialog("Select realmlist.wtf", RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Blizzard Entertainment\World of Warcraft", "InstallPath") & "WTF", "WoW Realm File (*.wtf)")
$OpenRealm = FileOpen($RealmLocation, 0)
$RealmLine = FileReadLine($OpenRealm, 30)
$CurrentRealmX = StringTrimLeft($RealmLine, 15)
$CurrentRealm = StringTrimRight($CurrentRealmX, 1)
GUICreate("WoW Realm Changer", 230, 92, 193, 115)
GUICtrlCreateLabel("Current Realmlist:", 8, 12, 86, 17)
GUICtrlCreateLabel("New Realmlist:", 8, 36, 74, 17)
$Input1 = GUICtrlCreateInput($CurrentRealm, 96, 8, 121, 21)
$Input2 = GUICtrlCreateInput("", 96, 32, 121, 21)
$SetRealm = GUICtrlCreateButton("Set Realm", 8, 56, 211, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $SetRealm
SetRealm()
EndSwitch
WEnd
Func SetRealm()
_FileWriteToLine($RealmLocation, 30, 'SET realmName "' & GUICtrlRead($Input2) & '"', 1)
If @error = 0 Then
MsgBox(0, "Realmlist Changed", "New Realm set to " & GUICtrlRead($Input2))
EndIf
EndFunc