ThRuST Well-Known Member Licensed User Longtime User Oct 26, 2018 #1 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 Code: Copy fx.ShowExternalDocument(File.GetUri(Folderpath, "")) or this Code: Copy Dim shl As Shell shl.InitializeDoNotHandleQuotes("shl", "Open", Array As String ("" & Folderpath)) 'shl.WorkingDirectory = File.DirApp shl.WorkingDirectory = Folderpath shl.Run(100) Last edited: Oct 27, 2018
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 Code: Copy fx.ShowExternalDocument(File.GetUri(Folderpath, "")) or this Code: Copy Dim shl As Shell shl.InitializeDoNotHandleQuotes("shl", "Open", Array As String ("" & Folderpath)) 'shl.WorkingDirectory = File.DirApp shl.WorkingDirectory = Folderpath shl.Run(100)
ThRuST Well-Known Member Licensed User Longtime User Oct 27, 2018 #2 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. Click to expand... Upvote 0
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. Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Oct 28, 2018 #3 Code: Copy Sub OpenPreferences Dim s As Shell s.Initialize("s", "open", Array("x-apple.systempreferences:")) s.Run(-1) End Sub Upvote 0
Code: Copy Sub OpenPreferences Dim s As Shell s.Initialize("s", "open", Array("x-apple.systempreferences:")) s.Run(-1) End Sub
ThRuST Well-Known Member Licensed User Longtime User Oct 28, 2018 #4 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 PC Upvote 0
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 PC
ThRuST Well-Known Member Licensed User Longtime User Oct 28, 2018 #5 I want to do the same for Mac. Upvote 0
ThRuST Well-Known Member Licensed User Longtime User Oct 28, 2018 #6 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
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.