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

mis interpretation/evaluation of tokens?

Expand Messages
  • Alan C.
    Hi, (see below too) and, Important the comments near top of clip H= copy/save a single clip ; Last edited:Tuesday, 02 October 2001 ; AC --------- ; gets
    Message 1 of 2 , Oct 2, 2001
    • 0 Attachment
      Hi,

      (see below too) and, Important the comments near top of clip

      H="copy/save a single clip"
      ; Last edited:Tuesday, 02 October 2001
      ; AC ---------
      ; gets entire header and clip code content of one
      ; clip, and copies, inserts it into a new doc
      ; -----------
      ; this clip MUST BE launched from a clipbar button
      ; Also
      ; BEFORE you launch this clip you must
      ; right click a clip then choose
      ; headers to clipboard
      ; then click this clip's clipbar button
      ; then choose the desired clip
      ^!SetListDelimiter ^p
      ^!SetArray %clips%=^$GetClipboard$
      ; Ensure the NoteTab INI file is being used
      ^!SetIniFile
      ; Save the NoteTab settings
      ^!ProgIniSave
      ^!Set %clb%=^$GetValue("Clipbook:DefaultLibrary")$
      ^!Set %clips%=^$StrReplace("^%NL%";"|";"^%clips%";True;False)$
      ^!Set %clip%=^?{(H=28) choose 1==^%clips%}
      ^!SetScreenUpdate OFF
      ^!Open ^$GetLibraryPath$^%clb%.clb
      ^!Find "H="^%clip%" IWST
      ^!Jump LINE_END
      ^!Set %row1%=^$GetRow$:1
      ^!Find "^pH=" IST
      ^!Jump SELECT_START
      ^!Set %row2%=^$GetRow$:1
      ^!SetCursor ^%row1%
      ^!SelectTo ^%row2%
      ; ^!SetClipboard ^$GetSelection$
      ^!SetCode %output%=^$GetSelection$
      ; ^!SetClipboard ^%output%
      ^!Close
      ^!Toolbar "New Document"
      ^!InsertCode ^%output%
      ; ---<end of clip<<

      H="perl cmd test"
      ^!dos perl.exe "^**"
      ; ---<end of clip<<

      Have the above 2 clips in librarys, can be in different
      libraries. Whenever try the top clip with ^!SetClipboard (to make a
      duplicate copy of the 2nd clip) then the copy that's made of the 2nd clip
      has token ^** evaluated thus:

      H="perl cmd test"
      ^!dos perl.exe "c:\temp\current_doc.txt"
      ; ---<end of clip<<

      just copy to windows clipboard: should NOT interpret/evaluate token

      Alan.
    • Hugo
      ... Alan, Taken from my message a couple of days ago... (Re ^p). I don t know if it suits you... ... If you use this command:
      Message 2 of 2 , Oct 2, 2001
      • 0 Attachment
        --- In ntb-clips@y..., "Alan C." <acummings@s...> wrote:
        >
        > just copy to windows clipboard: should NOT interpret/evaluate token
        >
        > Alan.

        Alan,

        Taken from my message a couple of days ago... (Re ^p). I don't know
        if it suits you...

        -----------------------
        If you use this command:

        H=";words"^%NL%^$UseTokens(^$GetSelection$)$

        the string as you indicated in the end of your message is inserted
        into the document (note UseTokens, it's counterpart is
        RemoveTokens). Maybe this helps...
        ----------------------

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