趣旨

applescriptを独学するため

サイトに記載されている例を元に逆引きの技術をつくってみる

参考にしたサイト

http://tukaikta.blog135.fc2.com/blog-entry-67.html

ボタンを表示するダイアログ

display dialog "Choose VNC or SSH" buttons {"VNC", "SSH", "Cancel"} default button 3 with icon note

ダイアログの結果を得る

copy the result as list to {buttonp}

条件分岐

if the buttonp is "VNC" then

else if the buttonp is "SSH" then

end if

変数の代入

set aUserName? to "--ユーザー名"

文字列の連結

"vnc://" & aUserName? & ":" & aPassword

失敗するかもしれない文の実行

try

end try

すでに開いているアプリケーションを利用

tell application "Terminal" to activate

新規にアプリケーションを利用

tell application "Terminal"

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS