Re: apply the same property to a number of items
Re: apply the same property to a number of items
- Subject: Re: apply the same property to a number of items
- From: Christopher Stone <email@hidden>
- Date: Tue, 22 Feb 2011 22:01:07 -0600
On Feb 22, 2011, at 20:15, Jean-Christophe Helary wrote: I'm sorry I'm being picky :)
I don't want the whole tree. I want only the folders I've specified because there are other folders down in the tree that I want untouched.
The original question was: can I apply a change of property to a list of folders without using a loop.
It seems the answer is no and I'm fine with that.
______________________________________________________________________
You'd think this would be an easy task, and for several other functions it is.
Note that these items are in different locations:
set aliasList to {alias "Thor:Users:chris:test_directory:UI Tools:Accessibility Inspector: Accessibility Inspector 2.0.txt", alias "Thor:Users:chris:test_directory:UI Tools:UI Browser:UI Browser.app:", alias "Thor:Users:chris:test_directory:UI Tools:UIElementInspector:UIElementInspector.app:"}
tell application "Finder" try delete aliasList on error errMsg number errNum set sep to "==============================" set e to sep & return & "Error: " & errMsg & return & sep & return ¬ & "Error Number: " & errNum & return & sep beep display dialog e end try end tell
With an alias list you can do a number of en-mass operations like delete, copy, move, and you'd think that should extend to operations like 'set label index'. Unfortunately Applescript is not always consistent. This is why one really needs to buy a good reference book and have access to others' experience via a list like ASUL. Otherwise you end up banging your head against the wall until it bleeds, and that way lies dain bramage.
Since you'll have to resort to a loop to do what you want I recommend you use aliases as references. It will run a bit faster that way.
-- Best Regards, Chris |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden