タグ

applescriptに関するfubaのブックマーク (1)

  • blog.8-p.info: How to write a Spotlight comment from the command line

    YouTube のひととブラクラのひとがほしがってたので書いてみた。 on run argv tell application "Finder" set comment of ((POSIX file (item 1 of argv)) as file) to (item 2 of argv) end tell end run こんなんを a.scpt とか保存して、 % osascript a.scpt file.txt 'hello world' でコメントがつけられます。AppleScript はよくわからないので引数に複数ファイルとかは無し。 Spotlight のメタデータを勝手にいじるには、ヘチマ_BLOG : MDItemSetAttribute(s) が使えるはずなんだけど、なぜか MDItemSetAttributes から kMDItemFinderComment をい

    fuba
    fuba 2006/02/25
    やったーヽ(´ー`)ノありがとう! これでエロ画像をダウンロードするやいなやSpotlightで検索できるようにするダウンローダが書けます!
  • 1