Re: Is it me or is Finder scripting broken?


Robert Poland
 



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" -- 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


Maybe the following will be of some help;

tell application "Finder"
activate
if ((current view of window index 1) = list view) then
set wdw to window 1
select wdw -- in case the window was not selected
tell wdw to tell its list view options
set m to width of column id modification date column
set width of column id modification date column to m + 1
set m to width of column id modification date column
set s to width of column id size column
set width of column id size column to s + 1
set s to width of column id size column
end tell
end if
end tell

Robert Poland
Fort Collins, CO

Join applescript@apple-dev.groups.io to automatically receive all group messages.