Is it me or is Finder scripting broken?
Can't get or set list, column or icon view properties:
tell application id "com.apple.finder" -- Finder
get properties of Finder preferences
(* comment out next line to see all properties *)
get icon view options of result (* it's currently set to "snap to grid" but returns missing value *)
--get folders spring open of result (* this works, it's currently set to true *)
end tell
On Nov 26, 2017, at 8:42 AM, John Stewart <psamech@...> wrote:Can't get or set list, column or icon view properties:
tell application id "com.apple.finder" -- Finderget properties of Finder preferences
(* comment out next line to see all properties *)
get icon view options of result (* it's currently set to "snap to grid" but returns missing value *)
--get folders spring open of result (* this works, it's currently set to true *)
end tell
Fort Collins, CO
On November 26, 2017 at 4:01:16 PM, Robert Poland (rpoland@...) wrote:
tell application "Finder"activateif ((current view of window index 1) = list view) thenset wdw to window 1select wdw -- in case the window was not selectedtell wdw to tell its list view optionsset m to width of column id modification date columnset width of column id modification date column to m + 1set m to width of column id modification date columnset s to width of column id size columnset width of column id size column to s + 1set s to width of column id size columnend tellend ifend tell
I’m looking at the desktop not just any random Finder window. I have a script that cleans my desktop by moving file/icons around, it won’t work if the Desktop isn’t set to snap top grid.
On November 26, 2017 at 8:46:19 PM, Christopher Stone (listmeister@...) wrote:
On 11/26/2017, at 17:09, John Stewart <psamech@...> wrote:
I’m looking at the desktop not just any random Finder window. I have a script that cleans my desktop by moving file/icons around, it won’t work if the Desktop isn’t set to snap top grid.
Hey John,Try this:----------------------------------------------------------------# Auth: Christopher Stone# dCre: 2017/11/26 19:40# dMod: 2017/11/26 19:44# Appl: Finder# Task: Get Arrangement of Window of Desktop# Libs: None# Osax: None# Tags: @ccstone, @Applescript, @Script, @Finder, @Arrangement, @Window, @Desktop----------------------------------------------------------------tell application "Finder"tell desktoptell its windowif its current view = icon view thentell its icon view optionsits arrangementend tellend ifend tellend tellend tell------------------------------------------------------------------Best Regards,Chris