Macで出来るMMORPG「
World of Warcraft」
複数のサーバで遊ぶために、realmlist.wtf を簡単に入れ替えるスクリプトを書いてみました。
実行するとこんな感じになります。

--
サーバ選択ボタンを表示します。display dialog "接続先を指定してください。"
buttons {"サーバ1", "サーバ2", "リストを編集"}
default button 1
set WOWSERVERS to button returned of result--
「サーバ1」ボタンを押すとrealmlist_01.wtf(あらかじめ用意しておく)の内容をrealmlist.wtfに上書きします。if WOWSERVERS is "サーバ1"
thenset cmd to "/Applications/World\\ of\\ Warcraft/Data/enUS/"
do shell script "cp " &
cmd & "realmlist_01.wtf " &
cmd & "realmlist.wtf"
--
「サーバ2」ボタンを押すとrealmlist_02.wtf(あらかじめ用意しておく)の内容をrealmlist.wtfに上書きします。else if WOWSERVERS is "サーバ2"
thenset cmd to "/Applications/World\\ of\\ Warcraft/Data/enUS/"
do shell script "cp " &
cmd & "realmlist_02.wtf " &
cmd & "realmlist.wtf"
--
「リストを編集」ボタンを押すとrealmlist.wtfをテキストエディットで開きます。else if WOWSERVERS is "リストを編集"
thendo shell script "open -a /Applications/TextEdit.app/ /Applications/World\\ of\\ Warcraft/Data/enUS/realmlist.wtf"
end if--ゲームの
開始ボタンを表示します。tell application "System Events"
activatedisplay dialog "ゲームを始めますか?"
buttons {"キャッシュを消去して開始", "開始", "今はしない"}
default button 1
set WOWCACHE to button returned of result--
「キャッシュを消去して開始」ボタンを押すとキャッシュを消してからゲームが始まります。if WOWCACHE is "キャッシュを消去して開始"
thentrydo shell script "rm -dr /Applications/World\\ of\\ Warcraft/Cache/WDB/"
do shell script "open -a /Applications/World\\ of\\ Warcraft/World\\ of\\ Warcraft.app/"
on errordo shell script "open -a /Applications/World\\ of\\ Warcraft/World\\ of\\ Warcraft.app/"
end try--
「開始」ボタンを押すとキャッシュを消さずにゲームが始まります。else if WOWCACHE is "開始"
thendo shell script "open -a /Applications/World\\ of\\ Warcraft/World\\ of\\ Warcraft.app/"
--
「今はしない」ボタンを押すとそのまま終了します。else if WOWCACHE is "今はしない"
thenend ifend tell