B4J Question How to open System Preferences (control panel) by code on Mac

ThRuST

Well-Known Member
Licensed User
Longtime User
Like the headlines says, how to open System preferences pane on Mac from B4J code?

I know that a path can be opened by doing this

B4X:
fx.ShowExternalDocument(File.GetUri(Folderpath, ""))

or this

B4X:
Dim shl As Shell
            shl.InitializeDoNotHandleQuotes("shl", "Open", Array As String ("" & Folderpath))
            'shl.WorkingDirectory = File.DirApp
            shl.WorkingDirectory = Folderpath
            shl.Run(100)
 
Last edited:

ThRuST

Well-Known Member
Licensed User
Longtime User
Well I found this but I'm not sure if it will open System Preferences pane on a Mac. Go here


  • To access the personal preference panes, use the path ~/YourHomeFolderName/Library/PreferencePanes.
  • To discover the public preference panes, use the path ~/Library/PreferencePanes.
 
Upvote 0

ThRuST

Well-Known Member
Licensed User
Longtime User
Great, now it works like it should. A bonus question concerning those System preferences sub panes, how to access those?
I'm not really familiar with Mac, but I want to create a module similar to in Windows. Look at the Floating menu in Windows to see what I mean.
Athena is starting to show some potential. I'll let the screenshot speak for themselves.
Thanks a bunch Erel. B4X is awesome and so are you :)

Mac

Athenav086_Screenshot_Mac.JPG


PC

Athenav086_Screenshot_PC.JPG
 
Upvote 0

ThRuST

Well-Known Member
Licensed User
Longtime User
I found OS X System References Links here I guess the complete path should be used not sure haven't tested it yet. Looks promising though.
 
Upvote 0
Top