Platforms to show: All Mac Windows Linux Cross-Platform

/MacCloud/Sandbox Safe LoginItems Helper App/Build
Required plugins for this example:
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCloud/Sandbox Safe LoginItems Helper App/Build
This example is the version from Thu, 6th Apr 2016.
Project "Build.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
EventHandler Sub Open() // find app dim Folder as FolderItem = GetFolderItem("") dim BuildHelper as FolderItem = Find(Folder, "Builds - Helper") dim BuildMain as FolderItem = Find(Folder, "Builds - Main") dim MacHelperFolder as FolderItem = find(BuildHelper, "Mac") dim MacMainFolder as FolderItem = find(BuildMain, "Mac") dim MainApp as FolderItem = MacMainFolder.Child("") dim HelperApp as FolderItem = MacHelperFolder.Child("") dim ContentsFolder as FolderItem = MainApp.Child("Contents") // add helper app to main app dim LibraryFolder as FolderItem = ContentsFolder.Child("Library") LibraryFolder.CreateAsFolder dim LoginItemsFolder as FolderItem = LibraryFolder.Child("LoginItems") LoginItemsFolder.CreateAsFolder HelperApp.CopyFileTo LoginItemsFolder.Child("") // fix info.plist dim HelperApp2 as FolderItem = LoginItemsFolder.Child("") dim ContentsFolder2 as FolderItem = HelperApp2.Child("Contents") dim InfoFile as FolderItem = ContentsFolder2.Child("Info.plist") dim b as BinaryStream = BinaryStream.Open(InfoFile, true) dim s as string = b.Read(b.Length, encodings.UTF8) if instr(s, "<key>LSUIElement</key>") = 0 then // not yet patched s = ReplaceAll(s, "</dict>", "<key>LSUIElement</key><true/></dict>") b.Position = 0 b.Write s b.Close end if MsgBox "OK" End EventHandler
Function Find(f as FolderItem, name as string) As FolderItem dim c as integer = f.Count for i as integer = 1 to c dim g as FolderItem = f.TrueItem(i) if g<>nil then if instr(,name)>0 then Return g end if end if next End Function
End Class
Class Window1 Inherits Window
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

Feedback, Comments & Corrections

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

The biggest plugin in space...

MBS FileMaker Plugins

Start Chat