G’day scripters
I have a need to remove the icon for an App, while the App is running.
I’ve found this in many places across the net, but it fails with Sierra.
The Dock re-starts to it’s default after running this. Obviously Sierra does not like the code.
Any thoughts on how I can do this, or what’s wrong with this code, please? I’ve tried everything I can think of.
Don’t run this code unless you first copy the .plist to the Desktop, so you can restore it. (Drag with Option down).
I’ve changed the script from a ‘run Dock' to a ‘killall’.
Regards
Santa
try tell application "System Events" set dockPlistFile to property list file "~/Library/Preferences/com.apple.dock.plist" tell dockPlistFile tell property list item "persistent-apps" set appTileItems to value of (every property list item whose value of property list item "tile-data"'s property list item "file-label" is not "Christmas Wonderland 6") set its value to appTileItems end tell end tell end tell end try do shell script ("killall Dock")
And what, you ask, was the beginning of it all? And it is this...... Existence that multiplied itself For sheer delight of being And plunged with numberless trillions of forms So that it might find itself innumerably
Sri Aurobindo
|