Re: "List View" ASIP Please!
Re: "List View" ASIP Please!
- Subject: Re: "List View" ASIP Please!
- From: Jed Verity <email@hidden>
- Date: Wed, 13 Dec 2000 15:45:46 -0800
Oops. Once again, here's the right one (it was the selection that was
screwing it up) :
------begin script-------
set parentFolder to (choose folder)
my doFolder(parentFolder)
on doFolder(parentFolder)
my setFolderProps(parentFolder)
tell application "Finder"
set folderList to every folder of parentFolder
end tell
set folderCount to (count items of folderList)
if folderCount 0 then
repeat with f from 1 to folderCount
set parentFolder to item f of folderList
my doFolder(parentFolder)
end repeat
end if
end doFolder
on setFolderProps(parentFolder)
tell application "Finder"
set view of container window of parentFolder to 2
end tell
end setFolderProps
------end script--------
How does that work for you?
Jed
On the threshold of genius, William Griffin wrote:
>
typo
>
if folderCount 0 then
>
should be....
>
if folderCount = 0 then
>
>
>
This one didn't work. Here is that App that compiled.
>
I compared the two and can only see that you changed the position of:
>
my setFolderProps(parentFolder)
>
>
I get a "This window must be open...." error. Do you?
>
>
Otherwise the Original script you sent works like a charm.
>
On a G4 it is breath taking.
>
I had no idea how many folders were on my boot partition.
>
>
>
Thanks Again.
>
>
>
Jed Verity wrote:
>
>
> Glad it worked for you, Bill! It had been a long time since I looked at that
>
> handler, so it wasn't as efficient as it could have been. Just for the
>
> record, here's the updated version if you or anyone else ever needs to use
>
> it:
>
>
>
> ------begin script------
>
> set parentFolder to (choose folder)
>
> my doFolder(parentFolder)
>
>
>
> on doFolder(parentFolder)
>
> my setFolderProps(parentFolder)
>
> tell application "Finder"
>
> set folderList to every folder of parentFolder
>
> end tell
>
> set folderCount to (count items of folderList)
>
> if folderCount 0 then
>
> repeat with f from 1 to folderCount
>
> set parentFolder to item f of folderList
>
> my doFolder(parentFolder)
>
> end repeat
>
> end if
>
> end doFolder
>
>
>
> on setFolderProps(parentFolder)
>
> tell application "Finder"
>
> select parentFolder
>
> set view of selection to 2
>
> end tell
>
> end setFolderProps
>
> ------end script-------
>
>
>
> Happy Scripting,
>
> Jed
>
>
>
> On the threshold of genius, Bill Griffin @ HelpDeskII wrote:
>
>
>
>> THAT WAS GREAT DID YOU POST IT TO THE SCRIPT List?
>
>>
>
>> Jed Verity wrote:
>
>>
>
>>> I think this'll do it. Choose the folder (or volume) that contains the
>
>>> other
>
>>> folders you want to set and let it rip (it can take a while).
>
>>>
>
>>> ------begin script
>
>>> set parentFolder to (choose folder)
>
>>> my doFolder(parentFolder)
>
>>>
>
>>> on doFolder(parentFolder)
>
>>> tell application "Finder"
>
>>> set folderList to every folder of parentFolder
>
>>> end tell
>
>>> set folderCount to (count items of folderList)
>
>>> if folderCount = 0 then
>
>>> my setFolderProps(parentFolder)
>
>>> else
>
>>> repeat with f from 1 to folderCount
>
>>> my setFolderProps(parentFolder)
>
>>> set parentFolder to item f of folderList
>
>>> my doFolder(parentFolder)
>
>>> end repeat
>
>>> end if
>
>>> end doFolder
>
>>>
>
>>> on setFolderProps(parentFolder)
>
>>> tell application "Finder"
>
>>> open parentFolder
>
>>> set view of container window of parentFolder to 2
>
>>> close parentFolder
>
>>> end tell
>
>>> end setFolderProps
>
>>> -------end script
>
>>>
>
>>> HTH,
>
>>> Jed
>
>>>
>
>>> On the threshold of genius, Bill Griffin @ HelpDeskII wrote:
>
>>>
>
>>>> Appleshare IP defaults all views to ICON view.
>
>>>> Need Applescript help set all folders to LIST
>
>>>> view without draging them on one at a time.
>
>>>>
>
>>>> Anyone? Any Ideas?
>
>>>>
>
>>>> I tried and failed.
>
>>>> --
>
>>>> William Griffin
>
>>>>
>
>>>> Ritta & Associates
>
>>>> 568 Grand Ave
>
>>>> Englewood, NJ 07631
>
>>>>
>
>>>> vox/fax: 201 567 4400/7330
>
>>>> http:/ritta.com
>
>>>> _______________________________________________
>
>>>> applescript-users mailing list
>
>>>> email@hidden
>
>>>> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
>>>>
>
>>>
>
>>> ~)~)~)~)~)~)~)~)~)~)~)~)~)
>
>>> Jed Verity
>
>>
>
>> --
>
>> William Griffin
>
>>
>
>> Ritta & Associates
>
>> 568 Grand Ave
>
>> Englewood, NJ 07631
>
>>
>
>> vox/fax: 201 567 4400/7330
>
>> http:/ritta.com