AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Macos set chrome as default browser9/11/2023 ![]() # Set up boolean condition to toggle default web browser values between "Safari" and "Google Chrome Set DefaultWebBrowserPopUpButton to first pop up button of (group 7 of ScrollArea) whose name is "Default web browser" Set ScrollArea to scroll area 1 of group 1 of group 2 of AXSplitGroup1 Set AXSplitGroup1 to first splitter group of AHostingViewGroup #ğormulate path to "Default web browser" pop up button Repeat until exists window "Desktop & Dock" # delay until System Settings' window displaying Desktop & Dock actually exists # open System Settings window displaying Desktop & Dock settings, using db123's methodĬurrent application's NSWorkspace's sharedWorkspace()'s openURL:(current application's NSURL's URLWithString:"x-apple.systempreferences:") Use AppleScript version "2.4" - Yosemite (10.10) or later I have now corrected the styling issue, thanks to Mockman’s kind input on using only lowercase text designating applescript in opening and closing brackets) (Unrelated to this AppleScript problem, but related to this post, I was unable to style the following script using the AppleScript brackets. Using db123’s recommendation, I was able to script Ventura 13.0 to reveal its Desktop & Dock window in System Settings, so that I could toggle the default browser value between Safari and Google Chrome. In any case, I am interested in another method to script this application, although I would much prefer a command line or other method to change the System Setting’s default browser. Perhaps relevant to this issue is that the dictionary’s version for System Settings is listed as 15.0 and not 16.0. System Settings’ pane and reveal pane functions remain in the dictionary for the application “System Settings”, but do not appear functional. The pane function appears to be no longer viable in AppleScript. That current property or method in Ventura, is now displayed in the System Settings’s window “Desktop & Dock”. My overall goal is to toggle System Settings’ default browser. I am interested in a new method of managing System Settings. With Ventura 13.0, System Settings no longer allows an AppleScript command to reveal its general pane.
0 Comments
Read More
Leave a Reply. |