[したいこと・しりたいこと・目標]
不可視ファイルを簡単に可視化したり、不可視化したり、切り替えるようにする不可視属性ファイルを表示する
[環境]
Mac OS X 10.6 Snow Leopard
Automator 2.1
[したこと]
(01)
Automator を起動する
テンプレートからアプリケーションを選ぶ
(workflow を選択しない)
ユーティリティ ライブラリ から
AppleScript を実行 するアクションを
右ペインにドラッグ&ドロップする
スクリプトの内容を書き換える
display dialog "Set the visibility of hidden files..." buttons {"Cancel", "Visible", "Invisible"} default button 1
copy the result as list to {buttonpressed}
if the buttonpressed is "Invisible" then
try
tell application "Finder" to quit
do shell script "defaults write com.apple.finder AppleShowAllFiles OFF"
delay 1
tell application "Finder" to activate
end try
else if the buttonpressed is "Visible" then
try
tell application "Finder" to quit
do shell script "defaults write com.apple.finder AppleShowAllFiles ON"
delay 1
tell application "Finder" to activate
end try
end if

0 コメント:
コメントを投稿