AppleScript名:指定Bundle IDのプロセス存在確認(ASOC)v3 |
— Created 2015-02-08 by Takaaki Naganoya — Created 2017-02-26 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "AppKit" set aRes to chkAppProcesByBundleID("com.apple.iWork.Keynote") –> true on chkAppProcesByBundleID(aBundleID as string) set procArray to current application’s NSWorkspace’s sharedWorkspace’s runningApplications()’s valueForKeyPath:"bundleIdentifier" return (procArray’s containsObject:aBundleID) as boolean end chkAppProcesByBundleID |
More from my site
(Visited 22 times, 1 visits today)