Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.LaunchServicesApplicationsForItemMBS(role as Integer) as LaunchServicesApplicationListMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Launch Services MBS MacOSX Plugin 3.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a list of folderitems to applications that offer the requested role(s) for the input item.
Example
dim l as LaunchServicesApplicationListMBS
dim f as FolderItem

f=GetFolderItem("text file")
l=f.LaunchServicesApplicationsForItemMBS(4)

if l<>nil then
MsgBox str(l.Count)
MsgBox l.Item(0).NativePath
end if

Requires Mac OS X 10.3.

If the folderitem is a file reference, it is treated as a document, and applications are selected based on the document's type information. Otherwise, applications are selected based on the folderitem's scheme.

Role:
The role(s) which must intersect with the role provided by an application for the specified item in order for the application to be included in the result. Pass kLSRolesAll if any role is acceptable.

Constants you can use for the role parameter:
kLSRolesNone = 1no claim is made about support for this type/scheme
kLSRolesViewer= 2claim to be able to view this type/scheme
kLSRolesEditor= 4claim to be able to edit this type/scheme
kLSRolesAll = -1claim to do it all

Upgraded in version 19.5 to use CFURL instead of FSRef APIs.

The items on this page are in the following plugins: MBS MacOSX Plugin.


The biggest plugin in space...