Re: Newbies Question...
Re: Newbies Question...
- Subject: Re: Newbies Question...
- From: Nigel Garvey <email@hidden>
- Date: Fri, 22 Feb 2002 12:02:15 +0000
sjp wrote on Thu, 21 Feb 2002 13:57:58 -0800:
>
Hey that works pretty good, but I'm having a problem with it reolving
>
aliases.
>
>
I modified it as follows:
>
>
tell application "Finder"
>
activate
>
select folder "Tab Folders "
>
open selection
>
select every item of container window of folder "Tab Folders "
>
open selection
>
set allFolders to every item of folder "Tab Folders "
>
repeat with kfolder in allFolders
>
set popup of container window of kfolder to true
>
end repeat
>
set the pulled open of front window to false
>
select folder "Tab Folders "
>
open selection
>
close container window of folder "Tab Folders "
>
end tell
Hi, sjp.
When scripting Finder actions directly, there's usually no need to use
'select'. If you've been recording your actions, what the script shows is
the manual processes that *you've* had to go through to handle the items.
By itself, the Finder doesn't need to do all that. For instance:
>
select folder "Tab Folders "
>
open selection
... can be scripted as just:
open folder "Tab Folders "
... and you don't even need that here, as you've only been opening this
folder to get at the items inside it. The Finder can go straight to them.
The following is a very simple and fast way of achieving what you want,
though I'm afraid it involves a few non-newbie concepts, such as the
Finder's ability to do things in bulk, setting by list, and 'telling'
something other than an application to do something.
tell application "Finder"
activate -- necessary for setting popups
close every window
open {alias files, folders} of folder "Tab Folders "
-- The only Finder windows now should be the ones just opened
tell every window to set {popup, pulled open} to {true, false}
end tell
NG
_______________________________________________
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.