UTIからアプリケーションのインストール先を求める
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
##自分環境がos12なので2.8にしているだけです
use AppleScript version "2.8"
use framework "Foundation"
use framework "AppKit"
use scripting additions
property refMe : a reference to current application
###対象のアプリケーションのUTI
set strUTI to "com.skype.skype" as text
####UTIからアプリケーションのインストール先を求める
set ocidAppBundle to refMe's NSBundle's bundleWithIdentifier:strUTI
if ocidAppBundle is missing value then
set appNSWorkspace to refMe's NSWorkspace's sharedWorkspace()
set ocidAppBundlePathURL to (appNSWorkspace's URLForApplicationWithBundleIdentifier:strUTI)
else
set ocidAppBundleStr to ocidAppBundle's bundlePath()
set ocidAppBundlePath to ocidAppBundleStr's stringByStandardizingPath
set ocidAppBundlePathURL to (refMe's NSURL's fileURLWithPath:ocidAppBundlePath)
end if
log ocidAppBundlePathURL as alias
return ocidAppBundlePathURL as alias
| 固定リンク
「UTType」カテゴリの記事
- シンボリックリンクのUTIの取得(2024.12.02)
- [UTType]処理対象のUTI(ファイルタイプ)か?チェックする 複数UTIでチェックする(2024.10.03)
- [UTType]処理対象のUTI(ファイルタイプ)か?チェックする(2024.09.30)
- UTI(uniform type identifier)の取得 ツリー構造付き 少し修正(2024.06.19)
- UTI(uniform type identifier)の取得 ツリー構造付き(2024.05.23)
「Slack」カテゴリの記事
- [bash]Slackアップデート 少し修正(2023.09.07)
- [BASH]SLACKユーザーアップデート(カレントユーザーのみ)(2023.06.08)
- [URLForApplicationToOpenURL]デフォルトのブラウザ(2023.06.05)
- [bash]インストール(全ローカルユーザー対象)(2023.06.01)
- UTIからアプリケーションのインストール先を求める(2023.04.25)