Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text items



Title: Text items
I have the following code:

    set AppleScript's text item delimiters to "."
    repeat with i from 1 to c1
       set item i of names1 to text item 1 of item i of names1
   end repeat

This will for example take the file name without the “.xxx” extension for every file name in a list (I know there can be “.” elsewhere in the name, but for this purpose, our naming conventions do not permit it.)

Is there some way to do this without the loop? For example, this does not work:

set AppleScript's text item delimiters to "."
set names1 to text item 1 of every item of names1

Thanks in advance!

--
Ken Fleisher

Photographer
Imaging & Visual Services
National Gallery of Art
Washington, D.C.

Phone: (202) 712-7471
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.