AppleScript名:Bundle IDからアプリケーションのパスを取得する |
— Created 2017-11-07 by Takaaki Naganoya — 2017 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "AppKit" set aBundleID to "com.apple.iWork.Keynote" set aRes to retPathFromBundleID(aBundleID) of me –> "/Applications/iWork ’13/Keynote.app" on retPathFromBundleID(aBundleID) set aURL to current application’s NSWorkspace’s sharedWorkspace()’s URLForApplicationWithBundleIdentifier:aBundleID if aURL = missing value then return false –Error return aURL’s |path|() as string end retPathFromBundleID |
(Visited 32 times, 1 visits today)