Reputation: 509
Is there any way to get the size of the icons on the desktop in Cocoa or Applescript? Preferably in cocoa.
Upvotes: 1
Views: 238
Reputation: 22930
You can use apple script
tell application "Finder"
set p to get the properties of icon view options of the window of the desktop
set iconSize to icon size of p
end tell
Upvotes: 0
Reputation: 3292
I use applescript to get it this way:
set icon_size to word 3 of (do shell script "defaults read com.apple.finder DesktopViewSettings | grep iconSize")
You could do in Cocoa a similar way using a shell call.
Upvotes: 1