Re: Text Item Delimiters length limit?
Re: Text Item Delimiters length limit?
- Subject: Re: Text Item Delimiters length limit?
- From: Paul Skinner <email@hidden>
- Date: Thu, 10 Oct 2002 10:30:32 -0400
On Wednesday, October 9, 2002, at 11:27 PM, Matthew Stuckwisch wrote:
In working to try to get my Hangman application to search for word
definitions after you've figure out the word, I needed to be able to
parse through a lovely text file (I have yet to find a Spanish
XML-based dictionary site) which even luckier for me is to big to fit
into one AppleScript variable
So, to work around this latter problem, I just save it directly from a
do shell script to a temp file and read from around the area the text
I need will start (very rough, I know, but it should work). My
problem is that I want to isolate the HTML code that contains the
definitions. If I use a multi-line text item delimiter, it always
fails to correctly break apart the string. If use a single line
delimiter, it fails after about 30-40 characters in length or so.
Has anyone encountered anything similar? Is there a length limit? Or
am I just doing something wrong?
Matthew Stuckwisch
set textblock to ""
repeat with x from 0 to 255
set textblock to textblock & (ASCII character x)
end repeat
set d to ""
repeat 100 times
repeat with x from 0 to 255
set d to d & (ASCII character x)
set AppleScript's text item delimiters to d
length of text items of textblock
end repeat
end repeat
say ("It seems OK to use tyds up to " & (length of AppleScript's text
item delimiters) as text) & " characters in length."
--OMM works up to 25600. Any ascii character seems to be acceptable.
--
Paul Skinner
_______________________________________________
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.