Add Item to Dock Programmatically

Discussion in 'Mac Programming' started by BobRon, Sep 15, 2013.

  1. macrumors newbie

    Joined:
    Oct 13, 2012
    #1
    Hi,
    I have an app that when run, it takes an app from a certain file path that is denoted by a variable "pathOfFile" and adds it to the dock. I found this that works quite well, but it adds it to the default new user dock. I want it to add it to one user's dock. Is this possible? I don't care if it is BASH or (preferably)AppleScript.
    Thanks,
    Bob
     
  2. macrumors newbie

    Joined:
    May 11, 2011
    #2
    Just modify the path of the code you linked to

    just write to

    Code:
    /Users/herpderp/Library/Preferences/com.apple.dock.plist
     

Share This Page