I have been learning more about if statements, and came up with the idea of using one in an Extension Attribute along with dockutil to look for Self Service in user Docks, and if not found add it back.
In Terminal the command dockutil --find 'Self Service' will return things like:
"Self Service was found in persistent-apps at slot XX"
or
"Self Service was not found in /Users/username/Library/Preferences/com.apple.dock.plist"
However in an EA script I don't know how to capture that result so it can be acted on.
I'm not asking for anyone to write the entire EA script for me (at least for starters LoL), just with help on finding how to capture the result so I can act on it so I can move to the next part of writing the EA.
Any advice?
Thank you!