Title: Re: Paragraph wrapping in 3 column view
on 7/3/04 5:53 PM, Allen Watson at [EMAIL PROTECTED] wrote:

> The truncation you are seeing, I see also (now).

<snip>

> Furthermore, making it into an HTML message is tedious!
>
> To do it, I had to create an HTML document using an HTML editor (I used
> BBEdit, and all I needed was the basic document outline, <HTML><BODY> and so
> on; it probably could be done in TextEdit using a template for the HTML
> shell). Since I was quoting another message, I had to copy that text out of
> Entourage and paste it into BBEdit, and surround paragraphs with the
> appropriate HTML paragraph tags. Then, I created the script URL, first
> copying the script from Script Editor, then converting it using Apple's
> Encode_script script, and pasting the resulting <A HREF> tag into the HTML
> document, which I then saved.
>
> I then opened that document in WORD, which renders it much like a browser
> would because of the HTML tags it sees (I also named the file with a .html
> suffix). Using Word's File menu, I selected Send To Recipient as HTML; this
> created the actual message back in Entourage! Whew!

<snip>

> Just did a test, sending a message from Netscape's HTML mail. It also gets
> truncated! The original message definitely has the entire script in it, but
> what I receive in Entourage is cut off after maybe 3.5 lines. Not sure where
> the flaw is here. I'll bet that if I put a "load in script editor" URL up on
> a web page, it will work; this is some problem with long URLs and mail, I
> think.

Ouch!! I knew that it was hard, especially because it was the first time something is used - but I didn't expect that much work.

I don't know if this will help. I did something as you described:

> I'll bet that if I put a "load in script editor" URL up on
> a web page

I used Internet Explorer to get the Applescript page you mentioned as containing the "encode" script within it. I then used Paul's "Send Complex HTML X 2.0.1" script to send that page to myself.

As you predicted, the script on that page came through just fine in the email I sent to myself. I don't know much about HTML - way too many <...> tags that I don't understand - but I did "view source" of the received message and noted that the script appears twice - once truncated in the plain text part and once as a complete script in the html part shown below.

I have no idea how you would (easily) get an html file that would also generate two versions of the script – one truncated and one not.

This is what I saw with “view source” of the email with the script within it:

Content-type: multipart/alternative;
    boundary="B_3171794375_63649040"

<snip>

--B_3171794375_63649040
Content-type: text/plain;
    charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

<snip>

The Encoding Script

Click here=20
<applescript://com.apple.scripteditor?action=""> i
pt%20encodes%20the%20script%20text%20currently%20on%20the%20clipboard%0Dtry=
%
0D%09display%20dialog%20%22Choose%20the%20link%20action%20and%20enter%20the=
%
20link%20text%3A%22%20button
>  for a script you can use to encode a script
copied to the clipboard. Save this script in your user Scripts folder to
have it available from the Script Menu.

<snip>

--B_3171794375_63649040
Content-type: text/html;
    charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>

<snip>
                
                <b>The Encoding Script</b><BR><BR>
                
                Click <a href="" COLOR="#0000FF">applescript://com.apple.scripteditor?action="">
=
2D%2D%20this%20script%20encodes%20the%20script%20text%20currently%20on%20the=
%20clipboard%0Dtry%0D%09display%20dialog%20%22Choose%20the%20link%20action%2=
0and%20enter%20the%20link%20text%3A%22%20buttons%20%7B%22Append%22%2C%20%22I=
nsert%22%2C%20%22New%22%7D%20default%20answer%20%22link%20text%22%20default%=
20button%203%0D%09copy%20the%20result%20as%20list%20to%20%7Blink_text%2C%20s=
cript_action%7D%0D%09set%20this_text%20to%20%28get%20the%20clipboard%29%20as=
%20string%0D%09set%20this_text%20to%20my%20encode_text%28this_text%29%0D%09i=
f%20the%20script_action%20is%20%22Append%22%20then%0D%09%09set%20the%20URL_o=
pening%20to%20%22%3Ca%20href%3D%5C%22applescript%3A%2F%2Fcom%2Eapple%2Escrip=
teditor%3Faction%3Dappend%26script%3D%22%0D%09else%20if%20the%20script_actio=
n%20is%20%22Insert%22%20then%0D%09%09set%20the%20URL_opening%20to%20%22%3Ca%=
20href%3D%5C%22applescript%3A%2F%2Fcom%2Eapple%2Escripteditor%3Faction%3Dins=
ert%26script%3D%22%0D%09else%20if%20the%20script_action%20is%20%22New%22%20t=
hen%0D%09%09set%20the%20URL_opening%20to%20%22%3Ca%20href%3D%5C%22applescrip=
t%3A%2F%2Fcom%2Eapple%2Escripteditor%3Faction%3Dnew%26script%3D%22%0D%09end%=
20if%0D%09set%20the%20clipboard%20to%20%28URL_opening%20%26%20this_text%20%2=
6%20%22%5C%22%3E%22%20%26%20link_text%20%26%20%22%3C%2Fa%3E%22%29%0D%09displ=
ay%20dialog%20%22The%20encoded%20script%20has%20been%20placed%20on%20the%20c=
lipboard%2E%22%20buttons%20%7B%22OK%22%7D%20default%20button%201%20with%20ic=
on%201%20giving%20up%20after%202%0Don%20error%20error_message%0D%09display%2=
0dialog%20error_message%20buttons%20%7B%22Cancel%22%7D%20default%20button%20=
1%0Dend%20try%0D%0D%2D%2D%20this%20sub%2Droutine%20is%20used%20to%20encode%2=
0text%20%0Don%20encode_text%28this_text%29%0D%09set%20the%20acceptable_chara=
cters%20to%20%22abcdefghijklmnopqrstuvwxyz0123456789_%22%0D%09set%20the%20en=
coded_text%20to%20%22%22%0D%09set%20the%20character_list%20to%20%7B%7D%0D%09=
repeat%20with%20this_char%20in%20this_text%0D%09%09set%20this_char%20to%20th=
e%20contents%20of%20this_char%0D%09%09if%20this_char%20is%20in%20the%20accep=
table_characters%20then%0D%09%09%09set%20the%20end%20of%20the%20character_li=
st%20to%20this_char%0D%09%09else%0D%09%09%09set%20the%20end%20of%20the%20cha=
racter_list%20to%20encode_char%28this_char%29%0D%09%09end%20if%0D%09end%20re=
peat%0D%09return%20%28the%20character_list%29%20as%20string%0Dend%20encode_t=
ext%0D%0D%2D%2D%20this%20sub%2Droutine%20is%20used%20to%20encode%20a%20chara=
cter%20%0Don%20encode_char%28this_char%29%0D%09set%20the%20ASCII_num%20to%20=
%28the%20ASCII%20number%20this_char%29%0D%09set%20the%20hex_list%20to%20%7B%=
220%22%2C%20%221%22%2C%20%222%22%2C%20%223%22%2C%20%224%22%2C%20%225%22%2C%2=
0%226%22%2C%20%227%22%2C%20%228%22%2C%20%229%22%2C%20%22A%22%2C%20%22B%22%2C=
%20%22C%22%2C%20%22D%22%2C%20%22E%22%2C%20%22F%22%7D%0D%09set%20x%20to%20ite=
m%20%28%28ASCII_num%20div%2016%29%20%2B%201%29%20of%20the%20hex_list%0D%09se=
t%20y%20to%20item%20%28%28ASCII_num%20mod%2016%29%20%2B%201%29%20of%20the%20=
hex_list%0D%09return%20%28%22%25%22%20%26%20x%20%26%20y%29%20as%20string%0De=
nd%20encode_char%0D">here</a> for a script you can use to encode a script co=
pied to the clipboard. Save this script in your user Scripts folder to have =
it available from the Script Menu.<BR><BR>

<snip>

</BODY>

--B_3171794375_63649040--

Reply via email to