While trying to solve a related issue I broke all the Safari actions in KM. KM can't control or do anything with Safari any more. Can someone please help me restore them? I'm not sure what command to use in Terminal or somewhere else I might need to change a KM setting.
In troubleshooting another issue I issued the following Terminal commands one at a time (with an Enter between)
defaults write com.stairways.keyboardmaestro.engine AppleScriptSafariBundleID -string "com.apple.SafariTechnologyPreview"
defaults write com.stairways.keyboardmaestro.engine BrowserSafariName -string "Safari Tech"
defaults write com.stairways.keyboardmaestro.engine AppleScriptSafariName -string "com.apple.Safari"
The result of which was:
- All Safari actions in existing macros then said they were "Safari Tech" actions and lacked a Safari icon
- Those actions no longer worked at all
Those commands came from manual:Single Page Version [Keyboard Maestro Wiki]
Realizing the wiki line called it "Safari Tech", I then sent through Terminal this:
defaults write com.stairways.keyboardmaestro.engine BrowserSafariName -string "Safari"
defaults write com.stairways.keyboardmaestro.engine AppleScriptSafariName -string "com.apple.Safari"
Results:
- Safari actions now say "Safari" but still lack a Safari icon
- Those now-Safari actions still don't work
- None of the Safari actions in the Actions List has a Safari icon (see screenshot)
- Creating a new macro and adding a Safari action (new window) doesn't work (see attached macro and screenshot)
In between each operation I quit and relaunched KM Engine and KM Editor.
TEST Safari New Window.kmmacros (1.8 KB)
Here is the XML (via Edit > Copy as XML} of the macro I just included. I don't see anything wrong or why it should not be launching Safari (which, by the way, does work just fine when used outside of a KM macro). The macro/action fails on Run and Try after quitting and restarting KMEditor, KMEngine, and the entire computer.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>ActionUID</key>
<integer>13882481</integer>
<key>Argument</key>
<string>https://keyboardmaestro.com</string>
<key>Command</key>
<string>NewWindow</string>
<key>MacroActionType</key>
<string>SafariControl</string>
<key>TimeOutAbortsMacro</key>
<true/>
<key>WebBrowser</key>
<string>Safari</string>
</dict>
</array>
</plist>
Keyboard Maestro v 11.0.3
macOS 13.6.7