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

Re: [NH] Clip on multiple files

Expand Messages
  • Jody
    Hi Francesco, ... H=Convert TXT to HTML - All Open, Use Clip ; http:/www.notetab.net, http://www.clean-funnies.com ;
    Message 1 of 12 , Dec 2, 2002
    • 0 Attachment
      Hi Francesco,

      >What I would like to do is:
      >I made a clip that convert plain text into HTML. I would like to
      >launch the clip on all the file I have opened in Notetab (it seems
      >that the advices by Hugo could work, even if I cannot have the time
      >to try).

      <--- Copy below this line --->
      H=Convert TXT to HTML - All Open, Use Clip
      ; http:/www.notetab.net, http://www.clean-funnies.com
      ; http:/www.notetab.net/html/cd-info.htm, Jody
      ; long line till ^!Document First
      ^!Continue Close all documents that you do *not*^%nl%want converted and the Clip Editor before^%nl%running this. Continue?
      ^!Document First
      ^!Set %n%=1; %Docs%=^$GetDocCount$
      :Loop
      ; ^!Menu Modify/Document to HTML/No Character Conversion
      ; Whew! Wore my fingers out and made my head spin typing all that! :)
      ; ^!Clip "RUN YOUR CLIP HERE"
      ; comment the next line out if you use your Clip.
      ^!Keyboard Alt+M D C
      ^!If ^$GetDocIndex$ > ^%Docs% End
      ; ^!Info If ^$GetDocIndex$ = ^%Docs% End
      ^!Inc %n%
      ^!SetDocIndex ^%n%
      ^!Goto Loop

      <--- Copy above this line --->
      <--- Right click over a Library --->
      <--- Choose: Add from Clipboard --->

      Here it is in brief:

      <--- Copy below this line --->
      H=Convert Document to HTML - All Open - Use Clip
      ; http:/www.notetab.net/html/cd-info.htm, Jody
      ^!Continue Converts *all* open docs to html. Continue?
      ^!SetDocIndex 1
      ^!Set %DocnDex%=1; %DocCount%=^$GetDocCount$

      :Loop
      ^!Clip "NAME OF YOUR CLIP HERE"
      ^!If ^$GetDocIndex$ > ^%DocCount% End
      ^!Inc %DocnDex%
      ^!SetDocIndex ^%DocnDex%
      ^!Goto Loop

      <--- Copy above this line --->
      <--- Right click over a Library --->
      <--- Choose: Add from Clipboard --->

      www.notetab.net, www.clean-funnies.com

      Happy HTML'n and Tab'n!
      Jody

      mailto:ntb-html-UnSubscribe@yahoogroups.com
      http://groups.yahoo.com/group/ntb-html
    • fgiacanelli
      ... Thanks to Jody and Hugo for their advices. Unfortunately the clip creates a loop on the last file opened in NoteTab, which could only be stopped with
      Message 2 of 12 , Dec 3, 2002
      • 0 Attachment
        --- In ntb-html@y..., Jody <av1611@e...> wrote:
        Thanks to Jody and Hugo for their advices.

        Unfortunately the clip creates a loop on the last file opened in
        NoteTab, which could only be stopped with CTRL+ALT keys. This is due
        perhaps to the fact that the clip that has to be open with the
        command !Clip "RUN YOUR CLIP HERE" opens at its turn a template, and
        this could render the condition "If..." always false.

        Sorry for my poor english and for the mistake in explanation. I hope
        to have been clear enough.

        Thanks very much again
        Francesco, Roma, Italy
      • Jody
        Hi Francesco, I don t know what your Clip does. If it is not opening a file or new document, then it should not matter. I tested it a few times and it always
        Message 3 of 12 , Dec 3, 2002
        • 0 Attachment
          Hi Francesco,

          I don't know what your Clip does. If it is not opening a file or
          new document, then it should not matter. I tested it a few times
          and it always stopped for me. If you are opening the Clip Editor
          in your Clip, yes, it will probably loop forever. You are putting
          the name to your Clip here: "RUN YOUR CLIP HERE", correct?

          ^!If ^$GetDocIndex$ > ^%Docs% End

          Try putting this in instead of your Clip:

          ^!Menu Modify/Document to HTML/No Character Conversion

          If it works, it's your Clip.

          >Unfortunately the clip creates a loop on the last file opened in
          >NoteTab, which could only be stopped with CTRL+ALT keys. This is due
          >perhaps to the fact that the clip that has to be open with the
          >command !Clip "RUN YOUR CLIP HERE" opens at its turn a template, and
          >this could render the condition "If..." always false.

          H=Convert TXT to HTML - All Open, Use Clip
          ^!Continue Close all documents that you do *not*^%nl%want converted and the Clip Editor before^%nl%running this. Continue?
          ^!Document First
          ^!Set %n%=1; %Docs%=^$GetDocCount$
          :Loop
          ; ^!Menu Modify/Document to HTML/No Character Conversion
          ; Whew! Wore my fingers out and made my head spin typing all that! :)
          ; ^!Clip RUN YOUR CLIP HERE
          ^!If ^$GetDocIndex$ > ^%Docs% End
          ; ^!Info If ^$GetDocIndex$ = ^%Docs% End
          ; comment the next line out if you use your Clip.
          ^!Keyboard Alt+M D C
          ^!Inc %n%
          ^!SetDocIndex ^%n%
          ^!Goto Loop


          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@yahoogroups.com
          mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
          http://groups.yahoo.com/group/ntb-clips
        • fgiacanelli
          ... Hi Jody, many thanks for your advices and your patience. Here is my clip: ^!Set %ext%=^$GetDocName$ ^!Set %nome%=^$GetName(^%ext%)$ ^!Select ALL
          Message 4 of 12 , Dec 4, 2002
          • 0 Attachment
            --- In ntb-html@y..., Jody <av1611@e...> wrote:
            > Hi Francesco,
            >
            > I don't know what your Clip does.

            Hi Jody,

            many thanks for your advices and your patience. Here is my clip:

            ^!Set %ext%=^$GetDocName$
            ^!Set %nome%=^$GetName(^%ext%)$
            ^!Select ALL
            ^$StrToHtml(^$GetSelection$)$
            ^!Select ALL
            ^!Keyboard Ctrl+C
            ^!Open ^$GetTemplatePath$recensioni.tpl
            ^!Find "[Inserire il testo qui]"
            ^!Paste
            ^!Save As ^%nome%.htm
            ^!Close

            This clip select the text in the file.txt, convert it to HTML, copy
            the HTML in a template ("recensioni.tpl") which will be saved with
            the same name of the file and extension .htm.

            For each file on which I run the clip a template will be opened to
            paste the HTML code into. This fact is perhaps the reason why the
            clip you write creates a loop on the last file (for the other file
            the clip works instead).

            Thanks very much in advance (sorry for the annoying thread)
            Regards
            Francesco
          • Alan B Cummings
            Hello, I tried just the doc indexer clip on my machine and it wouldn t stop with ^!If ^0 ^%Docs% End But it would stop when using = instead of the ^!If
            Message 5 of 12 , Dec 4, 2002
            • 0 Attachment
              Hello,

              I tried just the doc indexer clip on my machine and it wouldn't stop with

              ^!If ^0 ^%Docs% End

              But it would stop when using = instead of the >

              ^!If ^60^%Docs% End

              I put/added two lines, a skip line followed by a goto line and these same two can be removed. But, here's what (the = in the If line) did work for me:

              ^!Document First
              ^!Set %n%=1; %Docs%=^
              -Loop
              ; ^!Menu Modify/Document to HTML/No Character Conversion
              ; Whew! Wore my fingers out and made my head spin typing all that! :)
              ; ^!Clip RUN YOUR CLIP HERE
              ; ^!Info ^%n%^%NL%^%NL%^%Docs%
              ^!Skip Keep running/continue yes (or no to stop)
              ^!Goto end
              ^!If ^60^%Docs% End
              ; ^!Info If ^60 ^%Docs% End
              ; comment the next line out if you use your Clip.
              ; ^!Keyboard Alt+M D C
              ^!Inc %n%
              ^!SetDocIndex ^%n%
              ^!Goto Loop

              --
              Alan C.
            • Alan C.
              Hello, Some characters got changed inadvertently--so I send again using a different email client. I ll not use the other mail sender again until the problem
              Message 6 of 12 , Dec 4, 2002
              • 0 Attachment
                Hello,

                Some characters got changed inadvertently--so I send again using a different email client. I'll not use the other mail sender again until the problem gets worked out. Thanks.

                I tried just the doc indexer clip on my machine and it wouldn't stop with

                ^!If ^$GetDocIndex$ > ^%Docs% End

                But it would stop when using = instead of the >

                ^!If ^$GetDocIndex$=^%Docs% End

                I put/added two lines, a skip line followed by a goto line and these same two can be removed. But, here's what (the = in the If line) did work for me:

                ^!Document First
                ^!Set %n%=1; %Docs%=^$GetDocCount$
                :Loop
                ; ^!Menu Modify/Document to HTML/No Character Conversion
                ; Whew! Wore my fingers out and made my head spin typing all that! :)
                ; ^!Clip RUN YOUR CLIP HERE
                ^!Skip Keep running/continue yes (or no to stop)
                ^!Goto end
                ^!If ^$GetDocIndex$=^%Docs% End
                ; ^!Info If ^$GetDocIndex$ = ^%Docs% End
                ; comment the next line out if you use your Clip.
                ; ^!Keyboard Alt+M D C
                ^!Inc %n%
                ^!SetDocIndex ^%n%
                ^!Goto Loop

                --
                Alan C.
              • Jody
                Hi Francesco, ... I m glad to see they got it going for you. You weren t annoying at all. You can change the = that Alan mentioned to = and it should
                Message 7 of 12 , Dec 4, 2002
                • 0 Attachment
                  Hi Francesco,

                  >> I don't know what your Clip does.
                  >
                  >many thanks for your advices and your patience. Here is my clip:
                  >
                  >Thanks very much in advance (sorry for the annoying thread)

                  I'm glad to see they got it going for you. You weren't annoying
                  at all. You can change the "=" that Alan mentioned to ">=" and
                  it should work if you use your template or Document to HTML. I
                  normally use both or "<=" depending what I am doing. In the case
                  of my Clip though the "=" would cause it to not do the last
                  document because of where I had the testing string, ^!If.

                  See ya in the funnies,
                  Jody Adair, Prov. 15:15

                  Blessed are they who can laugh at themselves
                  for they shall never cease to be amused.

                  http://www.clean-funnies.com
                Your message has been successfully submitted and would be delivered to recipients shortly.