AppleScript名:Bundle IDからアプリケーションのURLを取得する |
— 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 retURLFromBundleID(aBundleID) of me –> "file:///Applications/iWork%20’13/Keynote.app/" on retURLFromBundleID(aBundleID) set aURL to current application’s NSWorkspace’s sharedWorkspace()’s URLForApplicationWithBundleIdentifier:aBundleID if aURL = missing value then return false –Error return aURL’s absoluteString() as string end retURLFromBundleID |
(Visited 14 times, 1 visits today)