*趣旨 [#hdfc4a81] applescriptを独学するため サイトに記載されている例を元に逆引きの技術をつくってみる **参考にしたサイト [#yf8f1afd] http://tukaikta.blog135.fc2.com/blog-entry-67.html *ボタンを表示するダイアログ [#pc54f515] display dialog "Choose VNC or SSH" buttons {"VNC", "SSH", "Cancel"} default button 3 with icon note *ダイアログの結果を得る [#r8c94f5f] copy the result as list to {buttonp} *条件分岐 [#d1490793] if the buttonp is "VNC" then else if the buttonp is "SSH" then end if *変数の代入 [#z18ee450] set aUserName to "--ユーザー名" *文字列の連結 [#oc4595d1] "vnc://" & aUserName & ":" & aPassword *失敗するかもしれない文の実行 [#jd53f334] try end try *すでに開いているアプリケーションを利用 [#e8bed1c4] tell application "Terminal" to activate *新規にアプリケーションを利用 [#xcbb4a93] tell application "Terminal"