MACSCRPT Archives

October 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
RJay Hansen <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 3 Oct 2008 14:03:28 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (124 lines)
Okay. This one runs, and it runs extremely quickly. The file I'm  
running it on is 420K and the script finishes virtually instantaneously.

However, opening the resulting file in Tex-Edit Plus gives very  
different results than opening it in TextEdit. Items are correctly  
italicized in TextEdit, but the paragraphs seem to be missing.

In Tex-Edit Plus, all the paragraphs are there, but the supposed-to- 
be-italic words and phrases are now delimited by \i and \i0 rather  
than underscores and their style is still plain.

So I tried doing a "Save As..." in TextEdit, saving as rtf, then  
opened that in Tex-Edit Plus and now the italic strings are all  
italicized, but the paragraphs are gone. Showing invisibles confirms,  
there are no paragraphs.

RJay


On Oct 3, 2008, at 12:35 PM, Paul Skinner wrote:

> Oh I feel stupid. That was the original text-accumulating version I  
> hosted.
>
> Never rush! ;)
>
> I just posted the live  writing version "live write Read and parse  
> underscores to italics.app.zip" with all the fixes from the first  
> version.
>
>
>
> sheepish,
> Paul
>
> On Oct 3, 2008, at 1:25 PM, Paul Skinner wrote:
>
>> RJay,
>>
>> 	Yes, Leopard has Applescript 2.0. I'm running 2.0.1. I find a lot  
>> of issues writing on 10.5 and delivering to clients on 10.4 and  
>> below.
>>
>> 	The -1728 is an unhandled case of only a separator in the read  
>> data on an un-even loop. I didn't think that should happen, but  
>> what about italicized underscores!
>>
>> 	The -1700 error looks to me like I failed to properly  
>> parenthetically group some text coercions. I suppose the handling  
>> is different under AS 1.10.7 and AS 2.0.1. I wrapped a lot of them  
>> up to see if that was the issue.
>>
>> EDIT: Ah I caught Mark's reply before I sent. So it doesn't like  
>> the "at text on the write line? hmmm... Still, it may be the  
>> coercion on that line getting confused.
>>
>> Fixed and replaced on my public folder.
>>
>> Paul
>>
>>
>> On Oct 3, 2008, at 1:02 PM, RJay Hansen wrote:
>>
>>> I was wondering the same thing (if it may have got garbled in  
>>> email).
>>>
>>> Running that gives slightly different results. First I get the  
>>> error:
>>>
>>> -1728
>>> Can't get text 1 thru -2 of "_"
>>>
>>> after dismissing that error message I get the same one I got from  
>>> pasting your script from email into a new script:
>>>
>>> -1700
>>> Can't make THE PENULTIMATE TRUTH
>>> by Philip K. Dick
>>> etc....
>>>
>>> I'm on 10.4.11 and my AppleScript version is 1.10.7
>>> Did Leopard come w/a new version of AppleScript?
>>>
>>> RJay
>>>
>>>
>>> On Oct 3, 2008, at 11:31 AM, Paul Skinner wrote:
>>>
>>>> Interesting.
>>>>
>>>> What this does is reads your source, and spits out a properly  
>>>> formated RTF file. Here it works splendidly. Why you're getting  
>>>> that error I'm not sure. I suspect it's getting garbled in the  
>>>> exchange.
>>>>
>>>> If you want to try it already compiled, you can download it from  
>>>> http://idisk.mac.com/paulskinner-Public?view=web under  
>>>> "Applescript stuff". It's named "Read and parse underscores to  
>>>> italics.app.zip".
>>>>
>>>> I am on 10.5.5. What's your OS version? What's your applescript  
>>>> verision? You can just run "version" to get it.
>>>>
>>>> Paul
>>>>
>>>>
>>>> On Oct 3, 2008, at 11:59 AM, RJay Hansen wrote:
>>>>
>>>>> Hmmm... It comes back with a -1700 error: Can't make "{\\rtf1\ 
>>>>> \ansi\\ansicpg1252\\cocoartf949\\cocoasu.... etc. into text.
>>>>>
>>>>> I'm not understanding what the purpose of that part of the  
>>>>> script is for?
>>>>>
>>>>> rjay
>>>>>
>>>>>
>>>>> On Oct 2, 2008, at 5:17 PM, Paul Skinner wrote:
>>>>>
>>>>>> 	This version should be able to handle any filesize that the  
>>>>>> read command can handle. No text accumulation, it writes as it  
>>>>>> reads. I think this is pretty solid; I'll stop now.
>>>>>>>>

ATOM RSS1 RSS2