6

I am trying to read information about the dock and retrieve the applications and their positions on the dock.

Can anyone give me a pointer on how to do this?

Edit: From ~/Library/Preferences/com.apple.dock.plist, I can get all information related to static(fixed) apps and folder but not about launched and minimized application tiles.

For launched apps, we can use NSWorkspace.

Big question is still minimized application tiles?

RLT
  • 4,219
  • 4
  • 37
  • 91
  • Perhaps the following will help? http://stackoverflow.com/a/2556674/420001 – Josh Apr 11 '12 at 16:42
  • I think this should give information about launched applications, but no the applications which are on dock but not launched. And there position. But thanks. – RLT Apr 11 '12 at 16:46
  • Do you think its possible to use Apple Script? – RLT Apr 11 '12 at 16:48
  • Did you ever figure this one out? I managed to get information on the persisted apps via com.apple.dock.plist dictionary https://gist.github.com/Noitidart/0c699e322f233401988f but i can't figure out how to get the non-persisted apps. – Noitidart Feb 05 '15 at 15:45

1 Answers1

2

~/Library/Preferences/com.apple.dock.plist has information about which applications are displayed in the Dock. However, it only lists which ones are permanently stored there--not any other applications that may be open.

iii
  • 1,594
  • 1
  • 9
  • 8