Loading ...
Sorry, an error occurred while loading the content.

An Experiment to Replace Clip Wrappers

Expand Messages
  • Larry Thomas
    Hi All In December,1999. I wrote a clip called Clip Wrappers. I wrote this clip to help me cope with the problem of my email program mangling clips that were
    Message 1 of 2 , Apr 3, 2003
    • 0 Attachment
      Hi All

      In December,1999. I wrote a clip called Clip Wrappers. I wrote this clip
      to help me cope with the problem of my email program mangling clips that
      were sent and received in my emails. The problem is that the mailer
      program or the remailers break up long code lines in the clips and when
      someone receives on in their email they have to try to figure out where to
      join the line together or the clip will not run correctly. The clip
      wrapper was meant to solve that by having NoteTab split the lines before
      inserting the clip into the document and marking the lines with a boundry
      or wrapper to indicate to the recipient which lines should be joined
      together to make the original long lines. I included a feature to allow
      the user to automatically unwrap the clip and a personal stamper so that
      you could stamp the top of the clip with a comment with your email address
      and the current time to show your authorship of the clip.

      This has worked for the most part but I have noticed on occasion that even
      NoteTab can place extra spaces in a clip where they are not wanted when
      unwrapping a clip. Several people on this list suggested that we could
      write a clip for replacing the spaces, returns, and tabs with other
      printable characters. It seems that everybody was looking for character
      patterns such as &&s& for a space and other such paterns. I was just
      playing around and I pressed Shift+F12 to look at the non-printing
      characters. I then realize that Eric is using characters from the ascii
      chart above 128 to display these items.

      ^$DecToChar(183)$ = · (A bullet for a space)
      ^$DecToChar(182)$ = ¶ (A paragraph symbol for a return)
      ^$DecToChar(187)$ = » (A right chevron for the start of a tab)
      ^$DecToChar(168)$ = ¨ (Two or more snake bite ;) characters to show the
      length of the tab}

      I decided that I could write a clip to search and replace the non-printing
      characters with these characters and then it would not matter how the mail
      server split up the lines or how many extra spaces they put in because I
      can just do a reverse search and replace and restore the clip the way it
      was. I do not know if this is really going to work. I am just trying it
      on the list now for the first time. Here are the two clips that I wrote.
      The first two are done with clip wrappers so that they can be put into you
      clipbooks the regular way using my clip unwrapper or even manually by
      joining the long lines. The seconed two copies are done with the new
      encoding. You will need to install the clips from the wrappers before you
      can try them out on the other copies.

      ______[Copy below this line]_______
      H="Code4Email"
      ;Larry Thomas <larryt@...>
      ;04/03/2003, 03:00:06 AM
      ^!Jump 1
      ^!Toolbar Select All
      ;
      ;----------------------[begin long line]---------------------------
      ^!Set %Var%=^$StrReplace("
      ";"^$DecToChar(183)$";"^$GetSelection$";False;False)$
      ;-----------------------[end long line]----------------------------
      ;
      ;
      ;----------------------[begin long line]---------------------------
      ^!Set
      %Var%=^$StrReplace("^$DecToChar(13)$^$DecToChar(10)$";"^$DecToChar(182)$";"^
      %Var%";False;False)$
      ;-----------------------[end long line]----------------------------
      ;
      ;
      ;----------------------[begin long line]---------------------------
      ^!Set
      %Var%=^$StrReplace("^$DecToChar(9)$";"^$DecToChar(187)$^$DecToChar(168)$^$De
      cToChar(168)$";"^%Var%";False;False)$
      ;-----------------------[end long line]----------------------------
      ;
      ^!InsertText ^%Var%
      _____[Copy above this line]______
      | right click over the clipbook |
      | and choose "Add from Clipboard" |
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      ______[Copy below this line]_______
      H="UncodeEmail"
      ;Larry Thomas <larryt@...>
      ;04/03/2003, 03:00:41 AM
      ^!Jump 1
      ^!Toolbar Select All
      ^!Set %Var%=^$StrReplace(" ";"";"^$GetSelection$";False;False)$
      ^!Set %Var%=^$StrReplace("^$DecToChar(183)$";" ";"^%Var%";False;False)$
      ;
      ;----------------------[begin long line]---------------------------
      ^!Set
      %Var%=^$StrReplace("^$DecToChar(182)$";"^$DecToChar(13)$^$DecToChar(10)$";"^
      %Var%";False;False)$
      ;-----------------------[end long line]----------------------------
      ;
      ;
      ;----------------------[begin long line]---------------------------
      ^!Set
      %Var%=^$StrReplace("^$DecToChar(187)$^$DecToChar(168)$^$DecToChar(168)$";"^$
      DecToChar(9)$";"^%Var%";False;False)$
      ;-----------------------[end long line]----------------------------
      ;
      ^!SetClipboard ^%Var%
      ^!Toolbar Paste New
      ;
      ;----------------------[begin long line]---------------------------
      ^!Info You can now right click on a clipname in the open clip panel and
      select "Add from Clipboard"
      ;-----------------------[end long line]----------------------------
      ;
      _____[Copy above this line]______
      | right click over the clipbook |
      | and choose "Add from Clipboard" |
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Code4Email¶^!Jump·1¶^!Toolbar·Select·All¶^!Set·%Var%=^$StrReplace("·";"^$Dec
      ToChar(183)$";"^$GetSelection$";False;False)$¶^!Set·%Var%=^$StrReplace("^$De
      cToChar(13)$^$DecToChar(10)$";"^$DecToChar(182)$";"^%Var%";False;False)$¶^!S
      et·%Var%=^$StrReplace("^$DecToChar(9)$";"^$DecToChar(187)$^$DecToChar(168)$^
      $DecToChar(168)$";"^%Var%";False;False)$¶^!InsertText·^%Var%¶


      UncodeEmail¶^!Jump·1¶^!Toolbar·Select·All¶^!Set·%Var%=^$StrReplace("·";"";"^
      $GetSelection$";False;False)$¶^!Set·%Var%=^$StrReplace("^$DecToChar(183)$";"
      ·";"^%Var%";False;False)$¶^!Set·%Var%=^$StrReplace("^$DecToChar(182)$";"^$De
      cToChar(13)$^$DecToChar(10)$";"^%Var%";False;False)$¶^!Set·%Var%=^$StrReplac
      e("^$DecToChar(187)$^$DecToChar(168)$^$DecToChar(168)$";"^$DecToChar(9)$";"^
      %Var%";False;False)$¶^!SetClipboard·^%Var%¶^!Toolbar·Paste·New¶^!Info·You·ca
      n·now·right·click·on·a·clipname·in·the·open·clip·panel·and·select·"Add·from·
      Clipboard"¶


      Good luck and Regards,


      Larry
      larryt@...
    • Larry Thomas
      Hi All My exoerunebt FAILED! Well, actually I found the problem right away and fixed with the clip below. I added a new line six to it that did not exist in
      Message 2 of 2 , Apr 3, 2003
      • 0 Attachment
        Hi All

        My exoerunebt FAILED! Well, actually I found the problem right away and
        fixed with the clip below. I added a new line six to it that did not exist
        in the old one. The email added extra retruns to the long line I sent and
        I added two search and replace replace lines to get read of any white
        spaces and returns before it is restored. That seems to take care of it.

        This line gets rid of white spaces added by the email.
        ^!Set %Var%=^$StrReplace(" ";"";"^$GetSelection$";False;False)$

        This line gets rid of line breaks add by the email.
        ^!Set %Var%=^$StrReplace("^P";"";"^%Var%";False;False)$

        ______[Copy below this line]_______
        H="UncodeEmail"
        ;Larry Thomas <larryt@...>
        ;04/03/2003, 03:44:09 AM
        ^!Jump 1
        ^!Toolbar Select All
        ^!Set %Var%=^$StrReplace(" ";"";"^$GetSelection$";False;False)$
        ^!Set %Var%=^$StrReplace("^P";"";"^%Var%";False;False)$
        ^!Set %Var%=^$StrReplace("^$DecToChar(183)$";" ";"^%Var%";False;False)$
        ;
        ;----------------------[begin long line]---------------------------
        ^!Set
        %Var%=^$StrReplace("^$DecToChar(182)$";"^$DecToChar(13)$^$DecToChar(10)$";"^
        %Var%";False;False)$
        ;-----------------------[end long line]----------------------------
        ;
        ;
        ;----------------------[begin long line]---------------------------
        ^!Set
        %Var%=^$StrReplace("^$DecToChar(187)$^$DecToChar(168)$^$DecToChar(168)$";"^$
        DecToChar(9)$";"^%Var%";False;False)$
        ;-----------------------[end long line]----------------------------
        ;
        ^!SetClipboard ^%Var%
        ^!Toolbar Paste New
        ;
        ;----------------------[begin long line]---------------------------
        ^!Info You can now right click on a clipname in the open clip panel and
        select "Add from Clipboard"
        ;-----------------------[end long line]----------------------------
        ;
        _____[Copy above this line]______
        | right click over the clipbook |
        | and choose "Add from Clipboard" |
        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯


        Larry
        larryt@...
      Your message has been successfully submitted and would be delivered to recipients shortly.