• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: changing view on every folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing view on every folder


  • Subject: Re: changing view on every folder
  • From: Jolly Roger <email@hidden>
  • Date: Tue, 07 Nov 2000 16:54:39 -0600
  • Replyto: email@hidden

on 11/7/2000 4:05 PM, Joseph D'Andrea wrote:

> Does anyone have or know where I can download an AppleScript or program that
> will set every folder on a volume to "View As List"?

It's sloppy, and could use some optimization; but here is one I wrote a
while back, more as a quick hack than anything:

property gParentPos : {h:0, v:0}

on open itemList
-- Akua Sweets sort
-- remove if you want
set itemList to order list itemList without case sensitivity
--
repeat with i from 1 to the count of itemList
set theItem to (item i of itemList) as alias
set the itemInfo to (info for theItem)
if (folder of the itemInfo) is true then
tell application "Finder"
-- set up parent location
set win to (folder theItem's window)
open win
set pos to (the position of win)
set (h of gParentPos) to (item 1 of pos)
set (v of gParentPos) to (item 2 of pos)
end tell
my FixWindow(theItem)
my ProcessFolder(theItem)
end if
end repeat
end open

on ProcessFolder(theFolder)
set itemList to FindFile in_folder theFolder with files and folders
-- Akua Sweets sort
-- remove if you want
set itemList to order list itemList without case sensitivity
--
repeat with i from 1 to the count of itemList
set theItem to (item i of itemList) as alias
set the itemInfo to (info for theItem)
if (folder of the itemInfo) is true then
set (h of gParentPos) to (h of gParentPos) + 6
set (v of gParentPos) to (v of gParentPos) + 22
my FixWindow(theItem)
my ProcessFolder(theItem)
set (h of gParentPos) to (h of gParentPos) - 6
set (v of gParentPos) to (v of gParentPos) - 22
end if
end repeat
end ProcessFolder

on FixWindow(theFolder)
-- NOTE that the variable theItem is a folder reference in alias format
tell application "Finder"
set win to the container window of theFolder
open win
set view of win to name
set zoomed full size of win to true
set zoomed of win to true
set the position of win to {(h of gParentPos), ,
(v of gParentPos)}
if (the number of items in theFolder) is 0 then
set the size of win to {660, 117}
end if
close win
end tell
end FixWindow

HTH

JR


References: 
 >changing view on every folder (From: "Joseph D'Andrea" <email@hidden>)

  • Prev by Date: setting FM container cell to an Image
  • Next by Date: RE: changing view on every folder
  • Previous by thread: changing view on every folder
  • Next by thread: RE: changing view on every folder
  • Index(es):
    • Date
    • Thread