Platforms to show: All Mac Windows Linux Cross-Platform

Back to LSSharedFileListMBS class.

LSSharedFileListMBS.Constructor(type as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates shared file list reference to be used for changing list and reading its various properties.

type: A constant indicating list type to create. See the constants in this class.

LSSharedFileListMBS.GetSeedValue as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns seed value of the shared list.

LSSharedFileListMBS.InsertFile(AfterItem as LSSharedFileListItemMBS, DisplayName as string, Icon as object, file as folderitem) as LSSharedFileListItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Insert item into shared list.
Example
// Add iPhoto to launch items

// pick app
dim app as FolderItem = SpecialFolder.Applications.Child("iPhoto.app")

// get list object
dim l as new LSSharedFileListMBS(LSSharedFileListMBS.kSessionLoginItems)

// insert file
dim item as LSSharedFileListItemMBS = l.InsertFile(l.kLSSharedFileListItemBeforeFirst, "Launch iPhoto", nil, app)

// check error
if l.Lasterror = 0 then
MsgBox "OK"
else
MsgBox "Failed: "+str(l.Lasterror)
end if

Inserts item into shared list at specified location. If the item already exists in the list it will be moved and its icon, display name and properties will be updated.

AfterItem: Item after which new item has to be inserted. To insert at the beginning of the list use kLSSharedFileListItemBeforeFirst or to insert at the end of the list use kLSSharedFileListItemLast.

DisplayName: Display name of the new item. Can be NULL.
Icon: IconMBS of the new item. Can be nil.
File: FolderItem of the new item.

LSSharedFileListMBS.InsertURL(AfterItem as LSSharedFileListItemMBS, DisplayName as string, Icon as object, URL as string) as LSSharedFileListItemMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Insert item into shared list.

Inserts item into shared list at specified location. If the item already exists in the list it will be moved and its icon, display name and properties will be updated.

AfterItem: Item after which new item has to be inserted. To insert at the beginning of the list use kLSSharedFileListItemBeforeFirst or to insert at the end of the list use kLSSharedFileListItemLast.

DisplayName: Display name of the new item. Can be "".
Icon: IconMBS object for the icon. Can be nil.
URL: URL of the new item.

LSSharedFileListMBS.Move(item as LSSharedFileListItemMBS, MoveAfterItem as LSSharedFileListItemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Moves item at specified location.

item: Item to move.
MoveAfterItem: New icon of the new item. Use kLSSharedFileListItemBeforeFirst and kLSSharedFileListItemLast to move at the beginning or the end of the shared list.

LSSharedFileListMBS.RecentItemsMaxAmount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Maximum amount of items in the list.

(Read and Write computed property)

LSSharedFileListMBS.Remove(item as LSSharedFileListItemMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Remove item from shared list.
Example
// Remove iPhoto from launch items

// get list object
dim l as new LSSharedFileListMBS(LSSharedFileListMBS.kSessionLoginItems)

// get items
dim items(-1) as LSSharedFileListItemMBS = l.Snapshot

// check all items
for each item as LSSharedFileListItemMBS in items
dim file as FolderItem = item.Resolve(LSSharedFileListItemMBS.kNoUserInteraction)

if file<>nil then
if file.Name = "iPhoto.app" then
l.Remove item

if l.Lasterror = 0 then
MsgBox "OK"
else
MsgBox "Error: "+str(l.Lasterror)
end if
Return
end if
end if

next

LSSharedFileListMBS.RemoveAllItems

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Remove all items from shared list.

LSSharedFileListMBS.SetAuthorization(handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Set authorization reference for the shared list.

Before attempting to perform a privileged operation on the shared list caller must authorize appropriate rights. For example, modifying kGlobalLoginItems list requires "system.global-login-items." right authorized.

LSSharedFileListMBS.Snapshot as LSSharedFileListItemMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates snapshot array, which is list of all items at the moment this method was called.

See also:

LSSharedFileListMBS.Snapshot(byref seed as UInt32) as LSSharedFileListItemMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates snapshot array, which is list of all items at the moment this method was called.

seed: Returned seed value at which snapshot was taken.

See also:

LSSharedFileListMBS.VolumesComputerVisible as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Is Computer item visible in favorite volumes list?

(Read and Write computed property)

LSSharedFileListMBS.VolumesIDiskVisible as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Is iDisk item visible in favorite volumes list.

(Read and Write computed property)

LSSharedFileListMBS.VolumesNetworkVisible as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Login Items MBS MacFrameworks Plugin 9.8 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Is Network item visible in favorite volumes list?

(Read and Write computed property)

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


The biggest plugin in space...