TID (Text Item Delimiters)
TID (Text Item Delimiters)
- Subject: TID (Text Item Delimiters)
- From: Robert Poland <email@hidden>
- Date: Fri, 30 May 2003 10:48:34 -0600
Hi,
Speaking of TIDs, Why doesn't the following remove spaces? and why
are the letters items and not words?
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 " " -- set TID to space
set AppleScript's text item delimiters to "" -- remove spaces
set AppleScript's text item delimiters to "-" -- seperate
into three words
set theMonth to item 2 of readData
display dialog theMonth as string
set result to (characters 1 thru 3 of readData)
set readData to (result)
set AppleScript's text item delimiters to ""
return {readData}
end shortenMonth
TIA,
--
Bob Poland - Englewood, CO
http://www.ibrb.org/
_______________________________________________
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.