Mailing Lists: Apple Mailing Lists

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

Textstring as List behaviour



Hi everybody,
I have a text which contains jpeg files separated by commas.
I need the filenames.extension in a list to walk through the items.

This is what I do:

set AppleScript's text item delimiters to {","}
set theList to words of "11250044.jpg,11250045.jpg,11250046.jpg, 11250047.jpg,11250048.jpg" as list
set the text item delimiters to ""


I exspected to get this:
{"11250044.jpg", "11250045.jpg", "11250046.jpg", "11250047.jpg", "11250048.jpg"}


But what I get is this:
{"11250044", "jpg", "11250045", "jpg", "11250046", "jpg", "11250047", "jpg", "11250048", "jpg"}


I don“t understand this behaviour. I thougt setting the delimiter to comma splits the string at the comma.

What am I doing wrong?
Any hints?

Regards, Ronald Hofmann
---




_______________________________________________ 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.