Update Dock Icon / Delete Dock Icon

I've written a small utility that changes some system settings. The utilities icon is changed to reflect the state of the system settings. I'm going crazy trying to get the dock icon to reflect the updated application icon. Is there a simple way to force the dock to refresh? I've found an applescript to add an icon and it adds a new icon (and the proper icon) but the original is also in the dock. I need a way to delete an icon, I guess. I can't find anything on the inter-webs on how to do this and all my attempts to delete an icon have failed. Can anybody out there help me with this. Thanks...

Unfortunately, I don't know of any simple way to refresh the Dock, although such a way most likely exists.
However, if you don't mind using [GUI Scripting|http://www.macosxautomation.com/applescript/uiscripting/index.html], the two scripts below should do approximately what you are asking for. Just replace "Stickies" (given here as an example) with the name of any other application. (You must also have enabled the Accessibility Frameworks by clicking the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane.)
To remove the icon from the Dock:
*tell application "Stickies" to quit*
*delay 0.5* -- adjust if necessary
*tell application "System Events" to tell UI element "Stickies" of list 1 of process "Dock"*
*if not (exists) then return*
*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*
To add the icon to the Dock:
*tell application "Stickies" to launch*
*tell application "System Events" to tell UI element "Stickies" of list 1 of process "Dock"*
*perform action "AXShowMenu"*
*click menu item "Options" of menu 1*
*tell menu item "Keep in Dock" of menu 1 of menu item "Options" of menu 1*
*if not (value of attribute "AXMenuItemMarkChar" exists) then*
click
else
*key code 53* -- escape
*end if*
*end tell*
*end tell*
Hope it can help.

Similar Messages

  • How make delete and add buttons as default apex icons(delete , add icons)

    Hi,
    I am new to Oracle apex , Please help me from below issue.
    I am having buttons called Add, Delete whic needs to be display as default apex delete, add icons.
    I have refered below link, even though i didn't get how to apply this.
    http://apex.oracle.com/pls/otn/f?p=45958:21:0:::::
    Please help me how add this icons and where can i see this icons in workspace.
    Thanks and regards,
    Ibrahim Sayyed.

    To call an image, you need to enter something like this in a HTML Region Body, Footer or Header:
    <img src="#IMAGE_PREFIX#alert_error.gif" title="delete" onclick="apex.submit('DELETE')" style="cursor:pointer">What are "default apex delete, add icons"?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • I have a MBP 15" with iPhoto 9. When right clicking on icon in dock 3 iPhoto libraries come up; one empty, one with 35,000 photos and one with 30,000 photos.  How can I delete the empty one and merge the other two without getting duplicates?

    I have a MBP 15" with Iphoto 9.  When I right click on icon in dock 3 iPhoto libraries come up; one empty, one with 35,000 photos and one with 30,000 photos.  How can I delete the empty library and merge the other two without getting duplicates?

    You can delete the empty one by dragging it to the trash ( test everything before emptying the trash)
    Merging libraries requires iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  it is the only current solution to merging libraries
    LN

  • How do I delete duplicate icons from the dock of an Imac 8.1?

    How do I delete duplicate icons from the dock of an Imac 8.1?

    No dragging to trash doesn't work. Just keep dragging them off. If they are stacked, which shouldn't happen, then when you delete one the other is still there.
    Just how did you get duplicates? Did you put them there? If not then you have other problems and I'm not sure how to correct it.

  • HT5293 How do I delete this icon from my dock?

    How do I delete FontForge icon from my dock?

    If it's a running application, control-click it and choose Quit. If it remains in the Dock or that isn't applicable, drag it out.
    (104223)

  • Safari/internet launcher icon deleted from the dock and now missing

    I am new to the Mac so there is probably an easy solution I just haven't discovered yet, but when playing with my preferences yesterday, I switched the dock to the left side and mistakenly deleted the internet launcher icon (the springboard-like icon with the @ symbol) but couldn't figure out what was gone and then emptied my trash later in the day. It doesn't help that I don't know exactly what the shortcut/launching icon was called, but I can't find it anywhere in Applications or through Safari. Now, in order to go on line I have to pull up Safari and then go from there.
    Any idea how to restore the launching icon since it appears to have been wiped from the harddrive?

    Hi vin, welcome to the Mac world.
    The little icon that looks like @ on a spring is nothing but a web location. If you click on it and your browser isn't running it will launch your browser and then open the web page it references. I believe the original was a link to Apple. If you want it back just click on the wee little icon at the start of a URL in your browser address space and hold that click while you drag it to the Trash side of the Dock.
    You can add and substract anything you want to the Dock--just drag whatever it is to the Dock or from the Dock. Applications go on the side of the Dock with the Finder icon, other things on the side with the Trash. Running Applications (there should be a little triangle next to the ones that are running) can't be removed while running.
    I strongly suggest you get David Pogue's Missing Manual book on Tiger, you will discover many many things to help you get the most from your new Mac.
    Francine
    Schwieder

  • How Can I Remove A Persistent Icon From Dock

    I've got an app's icon in my dock with a question mark in it.  I am unable to remove the icon from the dock(I should be able to push the icon out with my cursor and have it go "poof" but can't).  I deleted the app from my hard drive but the errant icon persists. I would think that there would be a file in my system  representing the icon but can't locate it.  How can I permanently delete the icon ?

    First, Safe Boot , (holding Shift key down at bootup), use Disk Utility from there to Repair Permissions.
    Then move these files to the Desktop...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist
    /Users/YourUserName/Library/Preferences/com.apple.dock.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.desktop.plist
    /Users/YourUserName/Library/Preferences/com.apple.recentitems.plist
    Reboot & test.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.
    Setup your Dock icons again.

  • Recent iMac Convert - Questions about Trash and Applications Icon on Dock

    Any advice would be appreciated. 2 issues:
    1. I transfered my windows files to my iMac today and having been cleaning up the various folders. I have deleted quite a few files and have opened and emptied the trash icon many times. From about 1 hour ago, the trash icon will no longer open when I single left click it, double left click it or right click it and select "Open". I can right click and select "Empty", but now I can not review what I am about to delete just in case I have accidently moved a file to the trash that I should not have.
    2. On the right side of my dock I only have icons for Documents and the Trash. I thought I was supposed to also have an icon for Applications. How can I put Applications in its proper spot on the dock. I tried dragging the applications icon from Finder to the space on the dock between the documents icon and the trash icon, but it will not allow me to do so.
    Any ideas?
    Thanks for the help.

    Same way. Navigate to /Home/ folder then drag the Documents folder to the right side of the Dock.
    Visit the site reference I gave you. You may find a solution in the FAQ I mentioned.
    You may also try the following:
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger and Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now shutdown the computer for a couple of minutes and then restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger, and 4.1 for Leopard) and/or TechTool Pro (4.6.1 for Leopard) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.

  • ICal date in application icon in dock is broken

    The iCal date that gets updated in the iCal application icon that sits in the dock is not working properly for me. The date is never aligned correctly. The black number is always positioned too high vertically and overlaps the red month area. I've checked iCal on other friend's machines (same OS, Leopard) and theirs display perfectly. Any idea why mine is out of whack? Please see screenshot below.
    The same thing is happening to the calendar widget on my dashboard too, so it appears as though it's some system wide bug/issue.

    evolution75,
    How on earth did you figure that out?!
    I am a regular visitor to this Forum, and the problem you described is not rare.
    How do I now go about removing duplicates?
    Just two simple steps:
    1. In Font Book, select the version of the font family that you want to use.
    2. Choose Edit > Resolve Duplicates.
    ;~)

  • Iphoto icon in dock has an O with a line thru it

    New hard drive installed - all updates are done and iphoto's icon (in dock) has a O with a line in it ...... it opens and appears to run okay but it looks blocked from the icon

    smpatch wrote:
    New hard drive installed - all updates are done and iphoto's icon (in dock) has a O with a line in it ...... it opens and appears to run okay but it looks blocked from the icon
    Is iPhoto in your Applications folder?
    LN

  • Can't remove HD icon from dock

    I somehow managed to put an icon on my dock not only once, but twice, to open my HD. Obviously, I don't want either one on there. But, I cannot delete either icon. I have tried dragging away, into trash, using the delete button- nothing seems to work. How do I get these icons off my dock? Thanks.

    i think Sean tried to provide this link http://discussions.apple.com/thread.jspa?messageID=10823304&#10823304

  • Two X11 icons in dock at startup

    After the latest update to 10.5.5, my Dock has two X11 icons in it when the computer starts up.
    My login items include X11 (just once), and until now this has resulted in only one X11 icon in the dock (plus an xterm window opening, which I immediately close). I haven't made any other changes. I have no other login items that require X11.
    Anybody know what's going on?

    1. Both icons point to the same place: Utilities > X11 (v2.1.5)
    2. Same location: Utilities > X11
    3. The icons can't be dragged out of the dock; they snap back in. If I quit X11 (either via the X11 menu or the Dock), only one of the two icons disappears.
    4. If I don't have X11 already running, I get error messages when I try to run X11 apps. E.g., from my Terminal window:
    ~ mrb$ xterm
    xterm Xt error: Can't open display:
    and from a Terminal window making an ssh connection to a Unix server:
    mss (mrb)% emacs
    mss (mrb)% connect /tmp/.X11-unix/X0: No such file or directory
    Error: Couldn't find per display information
    I've always had X11 as a startup item before, and it's never been a problem (although with the advent of Leopard it always starts an xterm window that I don't want and have to close).

  • Some files in "DOCUMENTS" icon in dock won't open. Get msg saying You need a newer version of Pages to open this document." Have Pages 4.1 installed.  Same files will open ok from Finder, Pages App. Recently sync'd with ipad2 (Pages) after iOS5 installed.

    Some files in "DOCUMENTS" icon in dock won't open. Get msg saying "You need a newer version of Pages to open this document." Already have Pages 4.1 installed.  Same files will open ok from Finder/Pages App./selected file. Prob not noted until recently after sync'd with ipad2 (Pages) when I installed iOS5. Anyone-- please?!

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Rate/review Pages 5.2 in the App Store.
    Peter

  • I have lost my dock icon from dock bar. i did two finger moment. now i want to get dock back to dock bar.

    I have lost dock from dock bar and even few more application like note and system perference. I did try to restore them as it is but could not relocate those. Please help me to get my dock back as i think its trashed now.
    Thank you
    I hope i am clear. I have lock the icon of dock and notepad from belowed dock bar. as i was learning the launchpad and put my two fingers on them and draged and those got transhed.
    i need those icon back as it was in past    

    HI, it isn't really clear here what the problem is... is something missing from the Dock, or is the Dock missing?

  • Safari only opens under 1 user,question mark appears over icon in dock...please help,i am clueless

    as title says safari opens under wifes user name,it was not in her dock we found it in trash and "put back",then icon appeared on her desk top we put it in her dock,now its in dock and desk top,and other usres cannot open safari,get question mark over icon in dock,we are clueless as u can probably tell any help appreciated

    ralphfromronkonkoma wrote:
    we found it in trash and "put back",then icon appeared on her desk top we put it in her dock,now its in dock and desk top,and other usres cannot open safari
    If you found Safari in the Trash it was probably the Safari.app itself. Icons on the Dock do not go into Trash. They drag off and "Poof".
    That means that the app, itself is on your Desktop. Choose it and Get Info (command-i). Does it say, "Safari.app"? Drag it back into /Applications folder. Then drag your icon off the Dock and create a new one by dragging Safari.app to the Dock. It will create an alias which is all the Dock icons are.
    The question mark means an alias has lost the path to the application. Have your other users drag it off the Dock and drag it from the applications folder to create a new alias on the Dock.

Maybe you are looking for

  • Multiple batch numbering in one client.

    Hi PP Gurus, We have a business scenario wherein more than one business exist. For clients pharma business then batch numering logi is different and for other businesses it is different. We have a proposal by which the Batch numbering at the time of

  • Unable to connect to an instance using EM but connecting fine with SQL*Plus

    Good morning, I followed these steps (from the 2 Day DBA document): 1. I created a template (including database) from an instance named "orcl" using DBCA, before proceeding to create the template, DBCA informed me that the instance would be shutdown,

  • No line item display possible for account -fbl3n

    Hi, No line item display possible for account , i'm getting the abv error when run fbl3n .. pls tell , how to resolve it..

  • HT5085 my apps wont come back or my music but my pictures came back

    how do i get back my music and apps including the free ones the pictures came back but not the music and apps. so can you help me please thank you.

  • Implementing JAVA Apis

    I am running java 5_7 from the command prompt on Windows. The error is that i have put various jar apis in my lib/ext file. When I am compiling from the command prompt i can use those apis. So for example: java org.apache.lucene.IndexFiles SCOTUSLex