Re: List view properties
Re: List view properties
- Subject: Re: List view properties
- From: Nigel Garvey <email@hidden>
- Date: Wed, 23 Apr 2003 12:47:01 +0100
zoff wrote on Tue, 22 Apr 2003 20:36:41 -0400:
>
In the script below I'm trying to set a Finder window to sort by the
>
Name column. I can set the window to list view but the other properties
>
don't work, I'm not getting any errors to at least give me a clue to
>
why its not working. Any ideas.
>
>
tell application "Finder"
>
activate
>
set current view of window 1 to list view
>
set properties of window 1 to {sort column:name column, calculates
>
folder sizes:false}
>
end tell
I assume you're using OS X here. Unfortunately, 'sort column' is not a
direct property of the window, but is one of the window's 'list view
options'. The 'list view options' also own the 'columns', one of which
has the name 'name column'. :-) The option 'calculates folder sizes' also
belongs to the window's 'list view options'. Conventionally, then, you're
looking at something like this:
tell application "Finder"
set sort column of list view options of window 1 to column name
column of list view options of window 1
set calculates folder sizes of list view options of window 1 to false
end tell
More conveniently, your script might be written with nested 'tell's:
tell application "Finder"
activate
tell Finder window 1
set current view to list view
tell its list view options
set sort column to column name column
set calculates folder sizes to false
end tell
end tell
end tell
NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.