Estoy intentando hacer un botón en la barra de herramientas del buscador que agrupe los elementos de las carpetas abiertas por tipo y los ordene por nombre. He encontrado un script en línea que ive modificado que parece hacer esto, t se detiene después de cambiar a la vista de iconos y no parece hacer nada más.
tell application "Finder"
activate
tell the front Finder window
set the current view to icon view
set the toolbar visible to true
end tell
tell icon view options of front Finder window
set properties to {sort column:name column, sort direction:normal, text size:12, uses relative dates:true, calculates folder sizes:true, shows icon preview:true}
end tell
tell application "System Events" to tell process "Finder"
tell menu item "Show View Options" of menu of menu bar item "View" of menu bar 1 to if exists then click
tell checkbox "Always open in icon view" of window 1 to if (exists) and value is 0 then click
tell checkbox "Always open in list view" of window 1 to if (exists) and value is 1 then click
tell checkbox "Date Modified" of group 1 of window 1 to if (exists) and value is 1 then click
tell checkbox "Date Created" of group 1 of window 1 to if (exists) and value is 1 then click
tell checkbox "Size" of group 1 of window 1 to if (exists) and value is 1 then click
tell checkbox "Kind" of group 1 of window 1 to if (exists) and value is 0 then click
tell checkbox "Version" of group 1 of window 1 to if v(exists) and alue is 1 then click
tell checkbox "Comments" of group 1 of window 1 to if (exists) and value is 1 then click
tell checkbox "Label" of group 1 of window 1 to if (exists) and value is 1 then click
end tell
end tell