text item delimiters maddness
text item delimiters maddness
- Subject: text item delimiters maddness
- From: James Burns <email@hidden>
- Date: Mon, 3 Feb 2003 13:59:59 -0500
Hello:
Today I have a question about how to properly extract select chunks
from a path, to truncate it to a certain length. Here's what I was
using:
set fileContents to read file sceneFile -- read chosen file
set text item delimiters to ":"
set conDir to ((words 1 thru -3 of sceneFile) as string) & ":" --
figure out content directory
... and this works fine for most files, except those that have the
underscore character in them.
Thus, a path of:
"TiBook1:Documents:jpb Projects:News24 Houston:scenes:News24in_02.lws"
becomes:
"TiBook1:Documents:jpb:Projects:News24:Houston:scenes:News24in:_:"
Any clever thoughts out there? Thanks in advance...
-----
James Burns
http://www.jamesburnsdesign.com
_______________________________________________
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.