• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Need to remove Dock icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need to remove Dock icon


  • Subject: Need to remove Dock icon
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 14 Sep 2016 07:16:03 +1000

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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Need to remove Dock icon
      • From: Shane Stanley <email@hidden>
    • Re: Need to remove Dock icon
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: problem with POSIX path of Š
  • Next by Date: Re: Need to remove Dock icon
  • Previous by thread: Fwd: problem with POSIX path of …
  • Next by thread: Re: Need to remove Dock icon
  • Index(es):
    • Date
    • Thread