• 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
problem w/ text item delimiters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem w/ text item delimiters


  • Subject: problem w/ text item delimiters
  • From: tom wible <email@hidden>
  • Date: Sun, 04 Feb 2007 20:25:47 -0500

i'm building a output line piece-wise:

	set html to {"<tr>"}
	set end of html to "      <td class=titl>"
...
	set html to {"<tr>"}
then

	log html
	log (count html)
	set AppleScript's text item delimiters to tvpi2crontab's newline -- crlf
	set html to (html as string)
	log html
	set AppleScript's text item delimiters to tvpi2crontab's DEFAULT_TID

now 3/4 executions of this code work as expected:

log html:
(*<tr>, <td class=titl>, NFC Championship, </td>, <td class=time>, Sun, 03:00PM, </td>, <td class=date>, 1/21/07, </td>, <td class=chnl>, 5-1, </td>, <td class=leng>, 0, </td>, <td class=descr>, <a class=button href='cgi-bin/play.sh?3' target=_blank>play</a>, <a class=button href='cgi-bin/delete.sh?3' target=_blank>delete</a>, <div class=epInfo id='ei3'>, Saints at Bears, <p>, New Orleans at Chicago. Drew Brees leads the versatile Saints attack against an aggressive Bears defense anchored by Brian Urlacher. This is the Saints' first appearance in the NFC title game, while Chicago hasn't advanced this far since the 1988 season., </div>, </td>, </tr>*)


log (count html)
	(*27*)

after the to-string linesplit:
(*<tr>
<td class=titl>
NFC Championship
</td>
<td class=time>
Sun
03:00PM
</td>
...
New Orleans at Chicago. Drew Brees leads the versatile Saints attack against an aggressive Bears defense anchored by Brian Urlacher. This is the Saints' first appearance in the NFC title game, while Chicago hasn't advanced this far since the 1988 season.
</div>
</td>
</tr>*)


but 1 is giving me fits:

log html
(*<tr>, <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>*)


log (count html)
	(*27*)

but after the split, all i get is this:

	(*<tr>
      <td class=titl>
*)

2 lines...wtf?!?!?!?




_______________________________________________ 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: "Gary (Lists)" <email@hidden>
  • Prev by Date: Re: How to convert "space" to "\space" for shell script
  • Next by Date: Re: problem w/ text item delimiters
  • Previous by thread: Capturing the "Return-Path" header information as text in Apple Mail?
  • Next by thread: Re: problem w/ text item delimiters
  • Index(es):
    • Date
    • Thread