Re: A quick one (View of a Finder window)
Re: A quick one (View of a Finder window)
- Subject: Re: A quick one (View of a Finder window)
- From: Nigel Garvey <email@hidden>
- Date: Sun, 11 Feb 2001 00:02:27 +0000
Rob Jorgensen wrote on Sat, 10 Feb 2001 13:41:13 -0500:
>
On 2/10/01, Chris Banford commented on "A quick one (View of a
>
Finder window)":
>
>
>How do I set the view of an open window in the Finder to 'List'?
>
>
tell application "Finder" to set view of container window of folder
>
"your folder" to name -- All one line
The 'view' settings also have numerical equivalents that can be useful in
some situations.
set view of container window of myFolder to modification date
-- or:
set view of container window of myFolder to 3
Say you wanted to set more than one window property at once, you couldn't
use 'modification date' in a list of values:
set {view, zoomed full size} to {modification date, true}
... because the compiler wouldn't then recognise it as a 'view' setting
but would take it as a property of whatever was *doing* the setting.
Using a numerical value would get round this.
tell application "Finder"
activate
tell the container window of disk "RAM Disk"
open
set {view, zoomed full size} to {3, true}
end tell
end tell
The equivalents in Mac OS 8.6 are:
0 = small (ie. small icons)
1 = icon (ie. large icons)
2 = name
3 = modification date
4 = size
5 = kind
6 = comment
7 = label
8 = version
9 = creation date
(10 to 14 = rubbish, don't use)
15 = large button
16 = small button
NG