• 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: View every folder of a folder by name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: View every folder of a folder by name


  • Subject: Re: View every folder of a folder by name
  • From: Andy Wylie <email@hidden>
  • Date: Sat, 21 Jul 2001 03:44:11 +1200

on 20/7/01 10:31 am, Nigel Garvey at email@hidden wrote:

> JollyRoger wrote on Thu, 19 Jul 2001 08:36:55 -0500:
>
>> On 7/18/2001 5:11 PM, "Nigel Garvey" <email@hidden> wrote:
>
>>> Sorry - 'entire contents' isn't as reliable as I thought here. Here's
>>> another version of the script which opens the subfolders recursively
>>> (though in sibling batches rather than individually, so it's still
>>> comparatively fast):
>>
>> (snip)
>>
>> Why do you have to open the folders at all? The script I originally posted
>> doesn't open folders and it works fine for me.
>
> Apologies, JR. I saw that your script required a third-party OSAX and
> stopped reading.
>
>snip<
> A hybrid of your script and mine takes less time than mine alone, though
> the computer locks up with no sign of activity until it's finished. In
> defence of my script, it does also set the 'zoomed' property of each
> window, which can only be done with the window open. :-)
>
> NG

I like to zoom them too and was inspired to try an Akua hybrid which seems
very good compared to my old vanilla script...
--------------
getFolders()

to getFolders()
try
set mum to ("" & (choose folder))
use cursor 4
set folderList to (the entries in file mum whose types are in
{"fold"} to a depth of -1 as file)
set listCount to (count of folderList)
use cursor 0
if listCount < 170 then
if listCount < 40 then
tidyum(folderList, listCount, mum)
else
display dialog "" & {mum, "'s ", listCount, " subfolders, i
can do in about ", (listCount * 0.55), " seconds OK?"}
set butRet to button returned of result
if butRet = "OK" then
if listCount > 100 then mutter ""
tidyum(folderList, listCount, mum)
end if
end if
else if listCount > 170 then
display dialog "" & {mum, "'s ", listCount, " subfolders is too
many, I'll do 170 "} buttons {"hmph", "OK"}
set butRet to button returned of result
if butRet = "OK" then getFolders()
end if
on error m number n
if n  -128 then error {n, m}
return
end try
end getFolders

to tidyum(folderList, listCount, mum)
set x to system value lm ticks
tell application "Finder"
activate
use cursor 4
set whatWasOpen to every container window whose popup is false
if the result is not {} then close whatWasOpen
try
open {alias mum, folderList}
on error
use cursor 0
return
end try
tell (every container window whose popup is false)
set {view, has custom view settings, shows creation date,
zoomed} to {2, true, false, true}
--close
end tell
close every window --quicker?
if whatWasOpen is not {} then open whatWasOpen
use cursor 0
if listCount > 30 then ,
display dialog " done! " & {listCount, " pert views in ", (round
(((system value lm ticks) - x) / 60)), " secs."} giving up after 5
end tell
end tidyum

_______________________cheers Andy


References: 
 >Re: View every folder of a folder by name (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Newbie Quark Question
  • Next by Date: Photoscripter and Open Command
  • Previous by thread: Re: View every folder of a folder by name
  • Next by thread: Simply- A fix to link
  • Index(es):
    • Date
    • Thread