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

[Clip] Clip Wrappers [A Clip Publisher Upgrade]

Expand Messages
  • Larry Thomas
    Hi All, We are about to begin a new year and I want to take this band width to wish you all a Happy New Year 2000 and welcome to the final year of the
    Message 1 of 1 , Dec 30, 1999
    • 0 Attachment
      Hi All,

      We are about to begin a new year and I want to take this band width to wish
      you all a Happy New Year 2000 and welcome to the final year of the
      Twentieth Century. Next year,January1, 2001, I plan to wish everybody a
      Happy New Millennium but until then....

      I have updated/upgraded my series of clips that I posted to the list last
      August. Publish Clip, EmailPaste, EmailPaste II, EmailPaste III, MultiClip
      Paste To Email, Remove Wrappers, Mark Long Lines and Personal Stamp have
      all been combined into this one clip along with some enhancements to each.
      This clip includes its own user friendly help so it should be easier to
      figure out with out much description. Let me know if you have any problems
      and I will try to fix them. If I fail, its Eric's fault. .. or Jody's
      ...or Y2K ...or some other equally lame excuse. !-)

      ______[Copy below this line]_______
      H="Clip Wrappers"
      ;Larry Thomas <larryt@...>
      ;12/30/1999, 07:46:23 AM

      ;----------------------[begin long line]---------------------------
      ^!^?[(H=10)Select Option==How To Use^=Goto HowTo|_Clip Wrapper^=Goto
      Editor|Restore Wrapped Clips in Clipboard^=Goto Restore|Personal
      Stamper^=Goto Stamp]
      ;-----------------------[end long line]----------------------------

      ^!Goto Exit

      :HowTo

      ;----------------------[begin long line]---------------------------
      ^!^?{(H=10)Select Item==_Overview^=Goto Overview|How To Use Clip
      Wrappers^=Goto WrapperInfo|How To Use Settings^=Goto SettingsInfo|How To
      Use Restore Wrapped Clips in Clipboard^=Goto RestoreInfo|How To Use
      Personal Stamper^=Goto StampInfo|Suggestions^=Goto SuggestionInfo}
      ;-----------------------[end long line]----------------------------

      ^!Goto Exit

      :Overview

      ;----------------------[begin long line]---------------------------
      ^!Info [L]OVERVIEW:^P^PThis clip has four main functions:^P^PHow To:^PThese
      instructions^P^PClip Wrapper:^PWraps clips for Email or
      Archives.^P^PRestore Wrapped Clips in Clipboard:^PDoes just
      that.^P^PPersonal Stamper:^PAdds your personal Stamp to a clip.^P^PClip
      Wrappers does not alter existing documents except for "Personal Stamper"
      which adds you stamp to an existing clip or document.^P^PClip Wrappers will
      wrap clips selected from an open clipbook library if you have it installed
      in a clipbook. It will do the same from the Clip Assistant but also will
      process clips from the open Clip Editor as well.^P^PYou may have Clip
      Wrappers installed in the Cliphelp.clh file or you can have a Farclip clip
      that calls it from another clipbook library installed there.
      ;-----------------------[end long line]----------------------------

      ^!Goto HowTo

      :WrapperInfo

      ;----------------------[begin long line]---------------------------
      ^!Info [L]WRAPPING CLIPS:^P^PFROM AN OPEN CLIPBOOK LIBRARY OR OTHER OPEN
      DOCUMENT:^P^PSelect/highlight one or more clips from the H="Clipname"
      heading to the last line of the last clip that you want wrapped. Select
      the settings you want and then click ok. When the clip is done, it will
      display the temporary file created and ask if you want to discard it. In
      most cases you will choose to discard this file. The finished wrapped clip
      is now in the clipboard and ready to be pasted to your email message or to
      the archive document.^P^PFROM THE OPEN CLIP EDITOR:^P^PSelect a clip to be
      wrapped so that the code for that clip is displayed in the open clip editor
      window. Run this clip. You do not need to select or highlight the clip
      code when wrapping from the editor. Select the settings you want and click
      ok. When the clip is done, it will display the temporary file created and
      ask if you want to discard it. In most cases you will choose to discard
      this file. The finished wrapped clip is now in the clipboard and ready to
      be pasted to your email message or to the archive document.^P
      ;-----------------------[end long line]----------------------------

      ^!Goto HowTo

      :SettingsInfo

      ;----------------------[begin long line]---------------------------
      ^!Info [L]THE CLIP WRAPPER SETTINGS:^P^PSELECT METHOD FOR WRAPPING
      CLIPS:^P^PBlock Wrap: The selection is wrapped in one wrapper for the
      entire highlighted block.^P^PMulti-Wrap: Each clip in the selection is
      wrapped in its own individual wrapper. If there are three clips in the
      selection then there will be three wrappers - one around each
      clip.^P^PBlock Wrap and Multi-Wrap are the same when only one clip is
      selected/highlighted for wrapping or if you are wrapping a clip from the
      clip editor.^P^PSELECT WRAPPER STYLE:^P^PStandard: ---------< start
      clip >---------^PInstructive: ______[Copy below this line]_______^P^PMARK
      LONG LINES FOR EMAIL:^P^P;----------------------[begin long
      line]---------------------------^PLong lines are placed inside of commented
      long line markers like this one.^P;-----------------------[end long
      line]----------------------------^P^PPERSONAL STAMP:^P^PYes/No: You can
      say no if you already have a personal stamp in the clip(s) being wrapped or
      for any other reason you might not want to include your personal Stamp.
      ;-----------------------[end long line]----------------------------

      ^!Goto HowTo

      :RestoreInfo

      ;----------------------[begin long line]---------------------------
      ^!Info [L]RESTORE WRAPPED CLIPS IN CLIPBOARD:^P^PYou must select a clip or
      several with clip wrappers in them and/or long lines marked using the "Mark
      Long Lines for Email" setting in the Clip Wrapper function and copy your
      selection to the clipboard before you can use this function.^P^PThis
      function will romove the wrappers and the long line markers and it will
      restore the long lines that may have had hard breaks inserted into them
      that were marked by the long line markers. The results will be stored in
      the clipboard and all you need to do is select a clipbook to add the clips
      to and select "Add from Clipboard".
      ;-----------------------[end long line]----------------------------

      ^!Goto HowTo

      :StampInfo

      ;----------------------[begin long line]---------------------------
      ^!Info [L]PERSONAL STAMPER:^P^PThis function adds your personal stamp to a
      document or to the beginning of a clip being displayed in the clip editor.
      You do not need to do anything but run this clip and select the function
      for it to work on the open clip editor if a clip is being displayed in the
      editor window. The stamp will be added to the top of the clip.^P^PIf you
      are adding a stamp to a clip in an open document or clip library, you must
      place your cursor on the line just above where you want the stamp to go and
      then select this function and the stamp will be placed there.
      ;-----------------------[end long line]----------------------------

      ^!Goto HowTo

      :SuggestionInfo

      ;----------------------[begin long line]---------------------------
      ^!Info [L]SUGGESTIONS FOR OTHER PROBLEMS WITH EMAILING CLIPS:^P^PIn cases
      where you are preparing clips with long lines that must have many tabs,
      spaces, or other non printing characters in them, you can sometimes have a
      problem with email clients (programs) or internet servers along the system
      that place hard breaks in the lines that are beyond a set length. If non
      printing characters are in the middle of one or more of these hard breaks,
      some tab or spaces may be dropped by the programs or servers and your
      carefully prepared clips will not work the way you planned when you emailed
      them.^P^PTo avoid this, use tokens (^^t^^p) and/or pre-defined variables
      ((^)%NL%, (^)%TAB%, OR (^)%SPACE%) where practical. With multiple spaces
      or tabs, use the (^)$StrFill("Str";Amount)$ function where possible. Use
      variables where possible and use the ^!Append %Variable%=Value command to
      break up long lines into shorter ones where possible.^P^PBest of all place
      your clips on your own website in a file for others to download or in a
      clipbook to send to the NoteTab Clip Libraries site for others to download
      or you can post information about your clips and send your clips as
      attachments by private email (do not send to the list) to those who request
      them.
      ;-----------------------[end long line]----------------------------

      ^!Goto HowTo

      :Editor
      ^!IfFalse ^$IsClipDoc$ Block ELSE Next

      ;----------------------[begin long line]---------------------------
      ^!Set %Style%=^?{Select Wrapper Style==_Standard ---------< start clip
      >---------^=Goto Standard|Instructive ______[Copy below this
      line]_______^=Goto Instructive};%MarkLines%=^?{Mark Long Lines for
      Email==_Yes^=Goto MarkLines|No^=Goto Next};%Stamp%=^?{Personal Stamp -
      Name, Email Address, Date, Time==_Yes|No}
      ;-----------------------[end long line]----------------------------

      ^!Set %Method%=Goto EditorReturn
      ^!^%Style%
      :EditorReturn
      ^!SetScreenupdate Off
      ^!ProgIniSave
      ^!Set %ShowHead%=^$GetValue(Clipbook:ShowHeaders)$
      ^!Set %Doc%=^$GetDocIndex$
      ^!Toolbar Copy All
      ^!ClipBoardSave
      ^!SaveValue Clipbook:ShowHeaders=1
      ^!ProgIniLoad
      ^!Jump 1
      ^!Select EOL
      ^!Toolbar Copy
      ^!Toolbar New Document
      ^!SetWordWrap Off
      ^!InsertText ^%StyleTop%^%nl%H="
      ^!Toolbar Paste
      ^!InsertText "^%nl%
      ^!IfSame "^%Stamp%" "Yes" Next Else Skip

      ;----------------------[begin long line]---------------------------
      ^!InsertText ;Larry Thomas <larryt@...> ^%nl%;^[mm/dd/yyyy^],
      ^[hh:nn:ss AM/PM^]^%nl%
      ;-----------------------[end long line]----------------------------

      ^!ClipBoardRestore
      ^!Toolbar Paste
      ^!InsertText ^%nl%^%StyleBottom%^%nl%
      ^!Replace "^p^p^%StyleBottom%" >> "^p^%StyleBottom%" WSA
      ^!IfError Next Else Skip_-1
      ^!Toolbar Copy All
      ^!SetWordWrap On
      ^!SaveValue Clipbook:ShowHeaders=^%ShowHead%
      ^!ProgIniLoad
      ^!^%MarkLines%
      ^!Jump 1
      ^!Skip Your Clip is ready to paste.^%nl%^%nl%Discard Temporary Document?
      ^!Goto FinishEditor
      ^!Close Discard
      :FinishEditor
      ^!SetDocIndex ^%Doc%
      ^!Jump Select_Start
      ^!Goto Exit

      :Block

      ;----------------------[begin long line]---------------------------
      ^!Set %Method%=^?{Select Method for Wrapping Clips==_Block Wrap - One
      wrapper for the whole block of clips^=Goto Wrapit|Multi-Wrap - One wrapper
      for each clip in the selection^=Goto Multi};%Style%=^?{Select Wrapper
      Style==_Standard ---------< start clip >---------^=Goto
      Standard|Instructive ______[Copy below this line]_______^=Goto
      Instructive};%MarkLines%=^?{Mark Long Lines for Email==_Yes^=Goto
      MarkLines|No^=Goto Next};%Stamp%=^?{Personal Stamp - Name, Email Address,
      Date, Time==_Yes|No}
      ;-----------------------[end long line]----------------------------

      ^!^%Style%

      :Standard
      ^!Set %StyleTop%=---------< start clip >---------
      ^!Set %StyleBottom%=---------< end clip >-----------
      ^!^%Method%

      :Instructive
      ^!Set %StyleTop%=______[Copy below this line]_______

      ;----------------------[begin long line]---------------------------
      ^!Set %StyleBottom%= _____[Copy above this line]______^%nl%| right click
      over the clipbook |^%nl%| and choose "Add from Clipboard"
      |^%nl%¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
      ;-----------------------[end long line]----------------------------

      ^!^%Method%

      :Wrapit
      ^!If ^$GetSelSize$ = 0 Next Else Skip
      ^!Goto SelectError
      ^!SetScreenupdate Off
      ^!Select Lines
      ^!Select -2
      ^!Toolbar Copy
      ^!Toolbar New Document
      ^!SetWordWrap Off
      ^!InsertText ^%StyleTop%^p
      ^!PASTE
      ^!Set %Row%=^$Getrow$
      ^!InsertText ^p^%StyleBottom%^p
      ^!Jump ^%Row%
      ^!If ^$Getline$=^%Empty% Next Else Skip
      ^!Deleteline
      ^!Jump 2
      ^!If ^$Getline$=^%Empty% Next Else Skip
      ^!Deleteline
      ^!IfSame "^%Stamp%" "Yes" Next Else Finish
      ^!Jump 1
      :Loop
      ^!Find ^H= RSA
      ^!IfError Finish Else Next
      ^!Jump +1

      ;----------------------[begin long line]---------------------------
      ^!InsertText ;Larry Thomas <larryt@...> ^%nl%;^[mm/dd/yyyy^],
      ^[hh:nn:ss AM/PM^]^%nl%
      ;-----------------------[end long line]----------------------------

      ^!Goto Loop
      :Finish
      ^!FOCUSDOC
      ^!Toolbar Copy all
      ^!Jump Doc_End
      ^!SetWordWrap On
      ^!Jump 1
      ^!^%MarkLines%
      ^!Skip Your Clip is ready to paste.^%nl%^%nl%Discard Temporary Document?
      ^!Goto Exit
      ^!Close Discard
      ^!Goto Exit

      :Multi
      ^!If ^$GetSelSize$ = 0 Next Else Skip
      ^!Goto SelectError
      ^!SetScreenupdate Off
      ^!Select Lines
      ^!Select -2
      ^!Toolbar Copy
      ^!Toolbar Paste New
      ^!SetWordWrap Off
      ^!Jump 1
      ^!If ^$Getline$=^%Empty% Next Else Skip_2
      ^!Deleteline
      ^!If ^$Getline$=^%Empty% Skip_-1 Else Next
      ^!InsertText ^%StyleTop%^p

      ^!Jump +1
      ^!IfSame "^%Stamp%" "Yes" Next Else LoopMulti

      ;----------------------[begin long line]---------------------------
      ^!InsertText ;Larry Thomas <larryt@...> ^%nl%;^[mm/dd/yyyy^],
      ^[hh:nn:ss AM/PM^]^%nl%
      ;-----------------------[end long line]----------------------------

      :LoopMulti
      ^!If ^$GetlineCount$=^$GetRow$ FinishMulti Else Next
      ^!Set %ReplaceString%=^%StyleBottom%^%nl%^%nl%^%StyleTop%^%nl%H=
      ^!Replace "^H=" >> "^%ReplaceString%" RS
      ^!IfError FinishMulti Else Next
      ^!IfSame "^%Stamp%" "Yes" Next Else LoopMulti
      ^!Jump +1

      ;----------------------[begin long line]---------------------------
      ^!InsertText ;Larry Thomas <larryt@...> ^%nl%;^[mm/dd/yyyy^],
      ^[hh:nn:ss AM/PM^]^%nl%
      ;-----------------------[end long line]----------------------------

      ^!Goto LoopMulti
      :FinishMulti
      ^!Jump Doc_End
      ^!InsertText ^p^%StyleBottom%
      ^!Replace "^p^p^%StyleBottom%" >> "^p^%StyleBottom%" WSA
      ^!IfError Next Else Skip_-1
      ^!Toolbar Copy All
      ^!SetWordWrap On
      ^!^%MarkLines%
      ^!Skip Your Clip is ready to paste.^%nl%^%nl%Discard Temporary Document?
      ^!Goto Exit
      ^!Close Discard
      ^!Goto Exit

      :SelectError

      ;----------------------[begin long line]---------------------------
      ^!Info [L]No Clips have been selected or highlighted for this clip to
      wrap.^P^PSelect one or more clips in the current document and run this clip
      again.^P
      ;-----------------------[end long line]----------------------------

      ^!Goto Exit

      :MarkLines
      ^!ClearVariable %WrapState%
      ^!ClearVariable %Line%
      ^!IfTrue ^$IsWordWrap$ Next Else Skip_2
      ^!Set %WrapState%=1
      ^!SetWordWrap Off
      :PreLoopLines
      ^!Jump 1
      :LoopLines
      ^!Find ^! AS
      ^!IfError Next Else DoMarks
      ^!Jump 1
      ^!IfTrue ^%WrapState Next Else Exit
      ^!SetWordWrap On
      ^!Toolbar Copy All
      ^!Skip Your Clip is ready to paste.^%nl%^%nl%Discard Temporary Document?
      ^!Goto Exit
      ^!Close Discard
      ^!Goto Exit
      :DoMarks
      ^!If ^$GetLineSize$ > 76 Next Else LoopLines

      ;----------------------[begin long line]---------------------------
      ^!Set %Line%=^p;----------------------[begin long
      line]---------------------------^p
      ;-----------------------[end long line]----------------------------

      ^!Jump Line_Start
      ^!InsertText ^%Line%
      ^!Jump +1

      ;----------------------[begin long line]---------------------------
      ^!Set %Line%=;-----------------------[end long
      line]----------------------------^p^p
      ;-----------------------[end long line]----------------------------

      ^!Jump Line_Start
      ^!InsertText ^%Line%
      ^!Goto LoopLines
      ^!Goto Exit

      :Restore
      ^!If ^$GetClipboardSize$ < 5 Next Else Skip_2

      ;----------------------[begin long line]---------------------------
      ^!Info [L]There is no wrapped clip in the clipboard. Copy a^pwrapped clip
      or clips into the clipboard and run this^pclip again.^P
      ;-----------------------[end long line]----------------------------

      ^!Goto Exit
      ^!SetScreenUpdate Off
      ^!Toolbar Paste New
      ^!Jump Doc_End
      ^!InsertText ^p
      ^!Jump 1
      ^!InsertText ^p
      ^!Replace "^p---------< start clip >---------" >> "" WSA
      ^!IfError Next Else Skip_-1
      ^!Replace "^p---------< end clip >-----------^%nl%" >> "" WSA
      ^!IfError Next Else Skip_-1
      ^!Jump 1
      ^!Replace "^p______[Copy below this line]_______" >> "" WSA
      ^!IfError Next Else Skip_-1

      ;----------------------[begin long line]---------------------------
      ^!Replace "^p _____[Copy above this line]______^%nl%| right click over the
      clipbook |^%nl%| and choose "Add from Clipboard" |^%nl%
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯^%nl%" >> "" WSA
      ;-----------------------[end long line]----------------------------

      ^!IfError Next Else Skip_-1
      ^!Jump 1
      ^!If ^$Getline$=^%Empty% Next Else Skip_2
      ^!Deleteline
      ^!If ^$Getline$=^%Empty% Skip_-1 Else Next
      ^!Replace "^p^p^p" >> "^p^p" WSA
      ^!IfError Next Else Skip_-1
      ^!Toolbar Copy All
      ^!Jump 1
      :LoopR

      ;----------------------[begin long line]---------------------------
      ^!Find "^p;----------------------[begin long
      line]---------------------------^p" SA
      ;-----------------------[end long line]----------------------------

      ^!IfError FinishR Else Next
      ^!InsertText
      ^!Set %Row%=^$Getrow$

      ;----------------------[begin long line]---------------------------
      ^!Find "^p;-----------------------[end long
      line]----------------------------" SA
      ;-----------------------[end long line]----------------------------

      ^!Set %NumLine%=^$Calc(^$Getrow$-^%Row%+1;0)$
      ^!InsertText
      ^!Jump ^%Row%
      ^!Select ^%NumLine%
      ^!Toolbar Join Lines
      ^!Goto LoopR
      :FinishR
      ^!Jump 1
      ^!Toolbar Copy All

      ;----------------------[begin long line]---------------------------
      ^!Skip Your Clip is ready to add to the current clipbook.^%nl%^%nl%Discard
      Temporary Document?
      ;-----------------------[end long line]----------------------------

      ^!Goto Exit
      ^!Close Discard
      ^!Goto Exit

      :Stamp
      ^!IfFalse ^$IsClipDoc$ Skip_2 ELSE Next
      ^!Jump 1
      ^!Goto Skip
      ^!Jump +1

      ;----------------------[begin long line]---------------------------
      ^!InsertText ;Larry Thomas <larryt@...> ^%nl%;^[mm/dd/yyyy^],
      ^[hh:nn:ss AM/PM^]^%nl%
      ;-----------------------[end long line]----------------------------

      ^!Goto Exit
      _____[Copy above this line]______
      | right click over the clipbook |
      | and choose "Add from Clipboard" |
      ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      Regards,

      Larry
      larryt@...


      Someday we'll look back on all this and plow into a parked car.

      Dilbert
    Your message has been successfully submitted and would be delivered to recipients shortly.