フォルダをリスト形式で開く
●サンプルスクリプト
(*アプリケーションフォルダをリスト形式で開き、
ツールバーを隠し、コメントでソートするAppleScript*)
tell application "Finder"
activate
try
(*「アプリケーション」ウィンドウがすでに開いている場合に備えて*)
select Finder window "アプリケーション"
set toolbar visible of Finder window 1 to false
set bounds of Finder window 1 to {40, 60, 560, 800}
set current view of Finder window 1 to list view
set visible of column id comment column of list view options of Finder window 1 to true
set visible of column id size column of list view options of Finder window 1 to false
set width of column id name column of list view options of Finder window 1 to 280
set width of column id comment column of list view options of Finder window 1 to 170
set sort column of list view options of Finder window 1 to comment column
on error
(*「アプリケーション」ウィンドウが存在しない場合*)
make new Finder window to folder "Applications" of startup disk
set toolbar visible of Finder window 1 to false
set bounds of Finder window 1 to {40, 60, 560, 800}
set current view of Finder window 1 to list view
set visible of column id comment column of list view options of Finder window 1 to true
set visible of column id size column of list view options of Finder window 1 to false
set width of column id name column of list view options of Finder window 1 to 280
set width of column id comment column of list view options of Finder window 1 to 170
set sort column of list view options of Finder window 1 to comment column
end try
end tell

●サンプルスクリプトの使い方
[PR]
by nobiox | 2012-07-01 17:17 | ├バカスクリプト |
<< inDesign のウィンドウ... | コピペで使うAppleScript >>