- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-23-2023 12:19 PM
Trying to write a replacement for SetDefaultMailApp which implies LaunchServices but seems to be part of CoreServices now and I've installed the python module but have no idea how to import it so I can use LSSetDefaultHandlerForURLScheme
Thanks for any Python 3.11 help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-30-2023 08:13 AM
Disappointed that no replies here or in Python forums so went with AppleScript application:
-- defaults write as an application to set mailto handler to Outlook
-- plist is under ~/Library/Preferences/
-- osascript -e 'id of app "Microsoft Outlook"'
-- will give you the com.microsoft.Outlook
do shell script "defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{\"LSHandlerPreferredVersions\" = { \"LSHandlerRoleAll\" = \"-\"; };LSHandlerURLScheme=mailto;LSHandlerRoleAll=com.microsoft.Outlook;}'"
display dialog "Reboot required to take effect" buttons {"OK"} default button "OK"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-30-2023 08:13 AM
Disappointed that no replies here or in Python forums so went with AppleScript application:
-- defaults write as an application to set mailto handler to Outlook
-- plist is under ~/Library/Preferences/
-- osascript -e 'id of app "Microsoft Outlook"'
-- will give you the com.microsoft.Outlook
do shell script "defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{\"LSHandlerPreferredVersions\" = { \"LSHandlerRoleAll\" = \"-\"; };LSHandlerURLScheme=mailto;LSHandlerRoleAll=com.microsoft.Outlook;}'"
display dialog "Reboot required to take effect" buttons {"OK"} default button "OK"
