Remove from dock
Can I just remove an icon from the dock using terminal.
I would like to remove the app from the dock as well, Like most uninstallers do.
I usually see them kill the dock
do shell script "killall Dock"
But how do I remove the app?
--------
At the moment I added some GUI Scripting but I would perfer not to use GUI scripting, because its a bit flaky.
Sometimes I noticed assistive device's says its on but the script does not always work stating that it is not on.
do shell script "touch /private/var/db/.AccessibilityAPIEnabled" with administrator privileges
try
tell application "XYZ" to quit
delay 0.5 -- adjust if necessary
tell application "System Events" to tell UI element "XYZ" of list 1 of process "Dock"
perform action "AXShowMenu"
click menu item "Options" of menu 1
click menu item "Remove from Dock" of menu 1 of menu item "Options" of menu 1
end tell
end try
MacBook Pro, Mac OS X (10.7.3)