开发者

Get list of running applications (translate from Applescript?)

开发者 https://www.devze.com 2023-03-08 16:34 出处:网络
I want to monitor what applications are running. It\'s simple enough in AppleScript, 开发者_开发问答but I can\'t find any useful information about how to do the same thing in Objective-C.

I want to monitor what applications are running. It's simple enough in AppleScript, 开发者_开发问答but I can't find any useful information about how to do the same thing in Objective-C.

on run
tell application "System Events" to get name of every process
end run


Your first port of call is the NSWorkspace documentation. In particular the runningApplications method.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号