How can I conditionally color files and folders in the OS X Finder?

前端 未结 5 1700
太阳男子
太阳男子 2020-12-17 05:05

I want to color badge files and folders based on the some condition in finder, what is the approach to achieve this in Mac OS X 10.6

I have checked this question: Th

5条回答
  •  孤街浪徒
    2020-12-17 05:52

    You need applescript. So you can use the scripting bridge or NSApplescript to script the Finder in cocoa. Here's a simple applescript to show how to do it.

    set a to (choose file)
    tell application "Finder"
        -- label colors
        -- 0 none, 1 orange, 2 red, 3 yellow, 4 blue, 5 purple, 6 green, 7 grey
        set label index of a to 6
    end tell
    

提交回复
热议问题