| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 4/26/05, bazmail <email@hidden> wrote:
Hi,
I have an script within Applescript studio at removes the last word
of a filename and put the result in a string. The problem is that the
string I get is {"wordone","wordtwo","etc"}
That's a list, not a string. You can explicitly coerce it to a string,
{"one", "two", "ten"} as string --> "onetwoten"
How can I get this string back into a format that I can use to make
a filename. The script works fine if it is a single word.
I will also need to put the spaces back in.
Applescript will insert its text item delimiters in between each
element of the list when coercing it to a string. By default, those
delimiters are {""}, that is, nothing. You can set them to spaces, if
that's what you want:
set AppleScript's text item delimiters to {" "}
{"one", "two", "ten"} as string --> "one two ten"
Be aware that the text item delimiters are global in scope.
Any help would be most helpful.
HTH,
Adam
Best wishes_______________________________________________
Michael
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden
This email sent to email@hidden
_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-studio mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-studio/email@hidden This email sent to email@hidden
| References: | |
| >Converting a string to a filename (From: bazmail <email@hidden>) | |
| >Re: Converting a string to a filename (From: Adam Wuellner <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.