Re: Setting Finder Preferences and Folder Views
Re: Setting Finder Preferences and Folder Views
- Subject: Re: Setting Finder Preferences and Folder Views
- From: Andy Wylie <email@hidden>
- Date: Thu, 21 Feb 2002 21:04:02 +1300
on 21/2/02 7:20 AM, Gregory Smith at email@hidden wrote:
>
Is there any way to set the Finder Preferences labels using AS
--------------
property finderPref : {"initialize", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0}
property labelColor : {}
property labelName : {}
if item 1 of finderPref = "initialize" then
getFinderPref()
else
set btnStr to button returned of (display dialog "Finder Preferences"
buttons {"Remember", "Reset", "Cancel"} default button 3)
if btnStr = "Remember" then
getFinderPref()
else if btnStr = "Reset" then
setFinderPref()
end if
end if
on getFinderPref()
tell application "Finder"
tell Finder preferences
set item 1 of finderPref to button view arrangement
set item 2 of finderPref to spatial view arrangement
set item 3 of finderPref to list view icon size
set item 4 of finderPref to shows comments
set item 5 of finderPref to shows creation date
set item 6 of finderPref to shows kind
set item 7 of finderPref to shows label
set item 8 of finderPref to shows modification date
set item 9 of finderPref to shows size
set item 10 of finderPref to shows version
set item 11 of finderPref to uses relative dates
set item 12 of finderPref to uses simple menus
set item 13 of finderPref to uses wide grid
set item 14 of finderPref to spring open folders
set item 15 of finderPref to delay before springing
set item 16 of finderPref to view font
set item 17 of finderPref to view font size
set labelColor to color of every label
set labelName to name of every label
end tell
end tell
end getFinderPref
on setFinderPref()
tell application "Finder"
tell Finder preferences
set button view arrangement to item 1 of finderPref
set spatial view arrangement to item 2 of finderPref
set list view icon size to item 3 of finderPref
set shows comments to item 4 of finderPref
set shows creation date to item 5 of finderPref
set shows kind to item 6 of finderPref
set shows label to item 7 of finderPref
set shows modification date to item 8 of finderPref
set shows size to item 9 of finderPref
set shows version to item 10 of finderPref
set uses relative dates to item 11 of finderPref
set uses simple menus to item 12 of finderPref
set uses wide grid to item 13 of finderPref
set spring open folders to item 14 of finderPref
set delay before springing to item 15 of finderPref
set view font to item 16 of finderPref
set view font size to item 17 of finderPref
repeat with i from 1 to 7
set color of label i to item i of labelColor
set name of label i to item i of labelName
end repeat
end tell
end tell
end setFinderPref
_____________________________ Andy
_______________________________________________
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.