Re: Summary: TID (Text Item Delimiters)
Re: Summary: TID (Text Item Delimiters)
- Subject: Re: Summary: TID (Text Item Delimiters)
- From: Michelle Steiner <email@hidden>
- Date: Fri, 30 May 2003 11:45:01 -0700
On Friday, May 30, 2003, at 10:57 AM, Robert Poland wrote:
Turns out that the following did what I wanted.
Not quite. This is what you wanted:
set readData to " 2 7 -June-2003"
my shortenMonth(readData)
display dialog ">" & result & "<" as string -- arrows for clarity
on shortenMonth(readData) -- set month to first 3 characters
set AppleScript's text item delimiters to "-" -- seperate into three
words
set readData to (text 1 thru 3 of text item 2 of readData)
set AppleScript's text item delimiters to ""
return readData
end shortenMonth
To see the difference, comment out the display dialog line, and look at
the result.
Your code returns the following:
--> {{"J", "u", "n"}}
Display dialog will coerce the result into a string to display, but the
result unchanged.
--Michelle
--
We're not human beings having a spiritual experience.
We're spiritual beings having a human experience.
_______________________________________________
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.