bBox_URLHandlerInfo( scheme )
Parameters: scheme: text indicating URL scheme Result: details on the scheme's handler in JSON format Error: none Script Step: none
––––––––––
First appeared in: 0.99.15
Examples in demo file: 1
Compatibility: Client, macOS, Server
––––––––––
For the given URL scheme, return the details that Launch Services has for the scheme and its current handler in JSON format.
Scheme values can be things like, "mailto" or "http". No result is returned if a handler isn't returned for the scheme.
If the variable $response contains the JSON result below, you could use these two methods to get the application name that is the scheme's handler using these two methods:
bBox_JQ (0; $result; ".CFBundleName")
JSONGetElement ($result; "CFBundleName")
––––––––––
Output example:
{ "CFBundleURLTypes" : [ { "LSIsAppleDefaultForScheme" : true, "CFBundleURLName" : "Email Address URL", "CFBundleURLSchemes" : [ "mailto" ] }, { "LSIsAppleDefaultForScheme" : true, "CFBundleURLName" : "Email Message Storage URL", "CFBundleURLSchemes" : [ "message" ] } ], "NSAppleScriptEnabled" : true, "CFBundleInfoDictionaryVersion" : "6.0", "DTPlatformVersion" : "12.6", "CFBundleIconFile" : "ApplicationIcon", "CFBundleName" : "Mail", "DTSDKName" : "macosx12.6.internal", "NSUserActivityTypes" : [ "com.apple.mail.compose", "com.apple.mail.mailbox", "com.apple.mail.message", "com.apple.mail.attachment" ], "NSServices" : [ { "NSMessage" : "mailSelection", "NSPortName" : "Mail", "NSSendTypes" : [ "NSPasteboardTypeRTFD", "NSPasteboardTypeRTF", "NSPasteboardTypeString", "Apple Web Archive pasteboard type" ], "NSMenuItem" : { "default" : "Mail\/New Email With Selection" } }, { "NSMessage" : "mailTo", "NSPortName" : "Mail", "NSSendTypes" : [ "NSPasteboardTypeString" ], "NSMenuItem" : { "default" : "Mail\/New Email To Address" } } ], "NSPrincipalClass" : "MailApp", "LSApplicationCategoryType" : "public.app-category.productivity", "MailPageSupported" : true, "NSAppAccentColorName" : "AppAccentColor", "CFBundleDocumentTypes" : [ { "CFBundleTypeName" : "Email Message", "CFBundleTypeRole" : "Viewer", "LSItemContentTypes" : [ "com.apple.mail.email" ], "LSIsAppleDefaultForType" : true }, { "CFBundleTypeRole" : "Viewer", "LSItemContentTypes" : [ "com.apple.mail.emlx" ], "CFBundleTypeName" : "Mail Message" }, { "CFBundleTypeRole" : "None", "LSItemContentTypes" : [ "com.apple.mail.emlx.part" ], "CFBundleTypeName" : "Mail Message Part" }, { "CFBundleTypeRole" : "Editor", "LSItemContentTypes" : [ "com.apple.mail.mbox" ], "CFBundleTypeName" : "Mail Mailbox" }, { "CFBundleTypeRole" : "Editor", "LSItemContentTypes" : [ "com.apple.mail.imapmbox" ], "CFBundleTypeName" : "Mail Cached IMAP Mailbox" }, { "CFBundleTypeRole" : "Editor", "LSItemContentTypes" : [ "com.apple.mail.ewsmbox" ], "CFBundleTypeName" : "Mail Cached Exchange Web Services Mailbox" }, { "CFBundleTypeRole" : "Viewer", "LSItemContentTypes" : [ "public.item" ], "LSHandlerRank" : "None" } ], "DTSDKBuild" : "21G520", "CFBundleShortVersionString" : "16.0", "CFBundleSupportedPlatforms" : [ "MacOSX" ], "com.apple.PreferenceSync.ExcludeSyncKeys" : [ "ActiveViewers", "DeliveryAccounts", "DeliveryAccountsBackup", "MailAccounts", "NotesSyncHaveUnsyncedChanges", "NotesSyncClientHasUpgradedForNoteID", "TableColumns", "AccountsVersion", "TigerImportDone", "StoreNotesInInboxIsDiscovered", "UnsyncedChangesDefaultsKey", "HasSetupIndexingDefaults", "CheckedForOldLSMMapFile", "BundleCompatibilityVersion", "Favorites" ], "BuildMachineOSBuild" : "20A241133", "DTPlatformBuild" : "21G520", "MailURLShareSupported" : true, "CFBundlePackageType" : "APPL", "CFBundleDevelopmentRegion" : "en", "DTXcodeBuild" : "13E6049a", "CFBundleVersion" : "3696.120.41.1.3", "MailSharingSupported" : true, "UTExportedTypeDeclarations" : [ { "UTTypeIdentifier" : "com.apple.mail.email", "UTTypeDescription" : "Email Message", "UTTypeConformsTo" : [ "public.data", "public.email-message" ], "UTTypeTagSpecification" : { "public.mime-type" : "message\/rfc822", "public.filename-extension" : "eml" } }, { "UTTypeIdentifier" : "com.apple.mail.emlx", "UTTypeDescription" : "Mail Message", "UTTypeConformsTo" : [ "public.data", "public.email-message" ], "UTTypeTagSpecification" : { "com.apple.ostype" : "EMLX", "public.filename-extension" : "emlx" } }, { "UTTypeIdentifier" : "com.apple.mail.emlx.part", "UTTypeDescription" : "Mail Message Part", "UTTypeConformsTo" : [ "public.data" ], "UTTypeTagSpecification" : { "public.filename-extension" : "emlxpart" } }, { "UTTypeIdentifier" : "com.apple.mail.mbox", "UTTypeDescription" : "Mail Mailbox", "UTTypeConformsTo" : [ "public.folder" ], "UTTypeTagSpecification" : { "public.filename-extension" : "mbox" } }, { "UTTypeIdentifier" : "com.apple.mail.imapmbox", "UTTypeDescription" : "Mail Cached IMAP Mailbox", "UTTypeConformsTo" : [ "public.folder" ], "UTTypeTagSpecification" : { "public.filename-extension" : "imapmbox" } }, { "UTTypeIdentifier" : "com.apple.mail.ewsmbox", "UTTypeDescription" : "Mail Cached Exchange Web Services Mailbox", "UTTypeConformsTo" : [ "public.folder" ], "UTTypeTagSpecification" : { "public.filename-extension" : "ewsmbox" } } ], "CFBundleNumericVersion" : 0, "NSSupportsSuddenTermination" : true, "OSAScriptingDefinition" : "Mail.sdef", "NSSupportsAutomaticTermination" : true, "PluginCompatibilityUUID" : "A4B49485-0377-4FAB-8D8E-E3B8018CFC21", "NSMainNibFile" : "MainMenu", "CFBundleIdentifier" : "com.apple.mail", "HPDHelpProjectIdentifier" : "mail", "DTXcode" : "1330", "CFBundleIconName" : "ApplicationIcon", "LSHasLocalizedDisplayName" : true, "CFBundleHelpBookName" : "com.apple.Mail.help", "CFBundleHelpBookFolder" : "Mail.help", "CFBundleExecutable" : "Mail", "MailLinkSupported" : true, "LSMinimumSystemVersion" : "12.6", "CFBundleSignature" : "emal", "UNUserNotificationCenter" : { "UNUniversalApplicationIdentifier" : "com.apple.mail", "UNRequiresTopics" : true, "UNDefaultCategories" : [ { "UNCategoryActions" : [ { "UNActionTitle" : "ReplyNotificationActionTitle", "UNActionForeground" : true, "UNActionIdentifier" : "com.apple.mail.replyButton" }, { "UNActionTitle" : "MarkReadNotificationActionTitle", "UNActionForeground" : false, "UNActionIdentifier" : "com.apple.mail.markAsReadButton" }, { "UNActionTitle" : "ArchiveNotificationActionTitle", "UNActionForeground" : false, "UNActionIdentifier" : "com.apple.mail.archiveButton" } ], "UNCategoryHiddenPreviewsBodyPlaceholder" : "USER_NOTIFICATION_PREVIEW_CONTENT_FORMAT", "UNCategoryHiddenPreviewsShowTitle" : true, "UNCategoryIdentifier" : "com.apple.mail.replyArchive" }, { "UNCategoryActions" : [ { "UNActionTitle" : "ReplyNotificationActionTitle", "UNActionForeground" : true, "UNActionIdentifier" : "com.apple.mail.replyButton" }, { "UNActionTitle" : "MarkReadNotificationActionTitle", "UNActionForeground" : false, "UNActionIdentifier" : "com.apple.mail.markAsReadButton" }, { "UNActionTitle" : "DeleteNotificationActionTitle", "UNActionForeground" : false, "UNActionIdentifier" : "com.apple.mail.deleteButton", "UNActionDestructive" : true } ], "UNCategoryHiddenPreviewsBodyPlaceholder" : "USER_NOTIFICATION_PREVIEW_CONTENT_FORMAT", "UNCategoryHiddenPreviewsShowTitle" : true, "UNCategoryIdentifier" : "com.apple.mail.replyDelete" } ], "UNDefaultTopics" : [ ], "UNSuppressDismissalSync" : false }, "DTPlatformName" : "macosx", "DTCompiler" : "com.apple.compilers.llvm.clang.1_0" }