• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: problem w/ text item delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem w/ text item delimiters


  • Subject: Re: problem w/ text item delimiters
  • From: "Stockly, Ed" <email@hidden>
  • Date: Tue, 6 Feb 2007 14:39:49 -0800

Here's a version of your script that clearly identifies a problem, and it's got me stumped also.

I've been using text item delimiters for years but have never  seen this one.

It seems that there is something in the text itself that AppleScript doesn't like, or maybe it's the TID you're using. I have no idea what it could be.

What's very strange is that if you build your list using "as string," as in the example below, it seems to work, even though the class is already string.

For now, that seems to be a good workaround, but  it's obviously a bug, maybe a new bug (it's new to me).

Perhaps Chris Nebel or one of the AppleScript experts has some insight.

ES
-----------------
set AppleScript's text item delimiters to ",       " --tvpi2crontab's newline -- crlf
set rawText to "<td class=titl>, Capture_Jan_21_2007__03_00_5-1_AM.m2t, 		</td>,
       <td class=time>, Sun, 03:33AM, </td>,       <td class=date>, 1/21/07,
</td>,       <td class=chnl>, *, </td>,       <td class=leng>, 0, </td>,
<td class=descr>, <a class=button href='cgi-bin/play.sh?2'
target=_blank>play</a>, <a class=button href='cgi-bin/delete.sh?2'
target=_blank>delete</a>, <div class=epInfo id='ei2'>, , <p>, , </div>, </td>,
</tr>"

set rawText to every text item of rawText
set html to {"<tr>"}
set myHtml to {"<tr>"}

repeat with thisString in rawText
	set end of html to thisString
	set end of myHtml to thisString as string
	class of thisString
	log the result
end repeat

html
log the result
myHtml
log the result
(count html)
log the result
(count myHtml)
log the result

set HtmlString to (html as string) -- OMM this is truncated
log the result
set myHtmlString to (myHtml as string) --OMM this is not
log the result

HtmlString
log the result
myHtmlString
log the result
	---------------
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: problem w/ text item delimiters
      • From: kai <email@hidden>
    • Re: problem w/ text item delimiters
      • From: T&B <email@hidden>
  • Prev by Date: Re: problem w/ text item delimiters
  • Next by Date: Re: problem w/ text item delimiters
  • Previous by thread: Re: problem w/ text item delimiters
  • Next by thread: Re: problem w/ text item delimiters
  • Index(es):
    • Date
    • Thread