Desktop setup script
Desktop setup script
- Subject: Desktop setup script
- From: iKel via AppleScript-Users <email@hidden>
- Date: Sun, 28 Jun 2020 21:50:30 -0500
hello!
I’m making a desktop setup script. Is there a way to set the Finder window
group? By Kind or modification date? I have it sort by kind column but it’s
nice to have it grouped in sections by kind. Realize I can just take my cursor
and go up to group in the Finder Toolbar and Click group by kind. But it’s just
nice to have all the setting done when I run the script.
I’m curious, does anyone else have Desktop Setup scripts? And if so, what is
some advice you can give to a novice scripter as myself? Any ideas I can
improve my script is much appreciated. My code is below. As always I appreciate
the help.
set chooseWindowLeft to choose folder
set chooseWindowRight to choose folder
--in order to take advantage of whole screen, check to see if dock is hidden,
if not hide dock
tell application "System Events"
get autohide of the dock preferences
if result is false then
set autohide of dock preferences to true
end if
end tell
--with dock hidden, and folders chosen, two Finder windows will open up and be
positioned vertically on the left and right side of the desktop
tell application "Finder"
(*using container windows maybe a better way to execute this script:*)
--chooseWindowLeft
tell the front Finder window
open chooseWindowLeft
set the properties to {bounds:{0, 25, 640, 802}, current
view:list view, toolbar visible:true, statusbar visible:true, pathbar
visible:true, sidebar width:190}
end tell
tell list view options of the front Finder window
set the properties to {calculates folder sizes:false, shows
icon preview:true, icon size:small, text size:12, uses relative dates:true,
sort column:kind column}
tell column kind column
set properties to ¬
{sort direction:normal, width:120, visible:true}
end tell
tell column modification date column
set properties to ¬
{sort direction:normal, width:120, visible:true}
end tell
end tell
set current view of the front Finder window to list view
set the current view of the window of every folder of chooseWindowLeft
to list view
--chooseWindowRight
tell the front Finder window
open chooseWindowRight
set the properties to {bounds:{639, 23, 1279, 800}, current
view:list view, toolbar visible:false, statusbar visible:true, pathbar
visible:true, sidebar width:0}
end tell
tell list view options of the front Finder window
set the properties to {calculates folder sizes:false, shows
icon preview:true, icon size:small, text size:12, uses relative dates:true,
sort column:kind column}
tell column kind column
set properties to ¬
{sort direction:normal, width:72, visible:true}
end tell
tell column modification date column
set properties to ¬
{sort direction:normal, width:72, visible:true}
end tell
end tell
set current view of the front Finder window to list view
set the current view of the window of every folder of chooseWindowRight
to list view
end tell
Kind regards,
Kell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden