- 投稿日 : 2009-06-28
- 更新日 : 2009-06-28
- AppleScript
次のサンプルでは、[ ホーム ] フォルダ内の [ デスクトップ ] フォルダに、オレンジのラベルを設定しています。
tell application "Finder"
try
set label index of desktop to 1
on error
log ("Error")
end try
end tell
ラベルの種類を変更するには、
set label index of desktop to 1
と言うコードの末尾にある数字を変更する事で、ラベルの種類を変更できます。 どの数字がどのラベル名に対応しているかは、次の通りです。
| 数字 | ラベル名 |
|---|---|
| 0 | ラベルなし |
| 1 | オレンジ |
| 2 | レッド |
| 3 | イエロー |
| 4 | ブルー |
| 5 | パープル |
| 6 | グリーン |
| 7 | グレイ |
動作確認 : Mac OS 10.5.7 + AppleScript 2.0.1
Comments:0
Trackbacks:0
- Trackback URL for this entry
- http://bowz.info/1783/trackback
- Listed below are links to weblogs that reference
- [ AppleScript ] Finder でラベルを付けるサンプル from Bowz::Notebook