• 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
Re: Need to remove Dock icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need to remove Dock icon


  • Subject: Re: Need to remove Dock icon
  • From: Yvan KOENIG <email@hidden>
  • Date: Tue, 13 Sep 2016 23:56:26 +0200


Le 13 sept. 2016 à 23:16, Brian Christmas <email@hidden> a écrit :

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")


Hello Brian

I guess that the Dock use cached datas and give priority to them against those modified on the fly.

The first time I thought to  that was when I discovered that cleaning the list of recents item thru the dedicated menu item wasn’t reflected in the Dock which continued to display it's "old" list.
I tried to find a file storing these datas but failed to get it.


Yvan KOENIG running El Capitan 10.11.6 in French (VALLAURIS, France) mardi 13 septembre 2016 23:56:20





 _______________________________________________
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

References: 
 >Need to remove Dock icon (From: Brian Christmas <email@hidden>)

  • Prev by Date: Need to remove Dock icon
  • Next by Date: Re: problem with POSIX path of …
  • Previous by thread: Need to remove Dock icon
  • Next by thread: Re: Need to remove Dock icon
  • Index(es):
    • Date
    • Thread