在可可中打开计算机路径

时间:2015-10-02 02:20:12

标签: objective-c macos cocoa finder

有没有办法在Cocoa中打开计算机路径?在OSX中,如果按Shift + Command + C,它将在Finder中打开计算机路径。现在我想在Cocoa应用程序中打开它。可能吗?感谢

1 个答案:

答案 0 :(得分:0)

我要做的是运行AppleScript(使用NSAppleScript类并不困难):

tell application "Finder"
    activate
    make new Finder window with properties {target:computer container}
end tell