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

The Rubbish Way to Do It

Expand Messages
  • Adrian
    ... The reason I end up doing this rubbish way is because I get stuck in various parts of the Clip programming help file trying to find the bit that works for
    Message 1 of 5 , Nov 13, 2012
    • 0 Attachment
      > ^!Jump Doc_End
      > ^!Find "</credit>" [BS]
      > ^!Keyboard RIGHT
      > ^!Keyboard CTRL+SHIFT+END
      > ^!Keyboard DELETE
      > ^!Keyboard CTRL+HOME
      > ^!Find "<credit page"
      > ^!Keyboard HOME
      > ^!Keyboard SHIFT+CTRL+HOME
      > ^!Keyboard DELETE
      >
      > ^!Menu Modify/Document to HTML/With Paragraph Tags
      > ^!Copy All
      > ^!Close Discard

      The reason I end up doing this rubbish way is because I get stuck in various parts of the Clip programming help file trying to find the bit that works for what I want. What do I select for all that down the file, for example. Can anyone, very quickly, replace the rubbish above with the better method they already understand. I know students call it 'spoonfeeding' but sometimes it gets you over the hill and becomes useful later.
    • Axel Berger
      ... Funny enough I can t, and I m surprised by that. ^!Jump and ^!Select accept all kinds of parameters like LINE_START or TEXT_END, but not ^!SelectTo. I find
      Message 2 of 5 , Nov 13, 2012
      • 0 Attachment
        Adrian wrote:
        > Can anyone, very quickly, replace the rubbish above
        > with the better method.

        Funny enough I can't, and I'm surprised by that. ^!Jump and ^!Select
        accept all kinds of parameters like LINE_START or TEXT_END, but not
        ^!SelectTo. I find that very surprising, but there it is. The roW:col
        notation for TEXT_START is obvious, but TEXT_END?

        I've not noticed this shortcoming, because I usually do it the other way
        round. Instead of deleting the unwanted, I ^!Find the wanted and
        ^!AppendToFile.

        Axel
      • Don
        ... I sent out a five liner yesterday that did everything except strip the tags. If you give an example of the output format you want, getting it right is
        Message 3 of 5 , Nov 13, 2012
        • 0 Attachment
          On 11/13/2012 3:12 PM, Adrian wrote:
          >> ^!Jump Doc_End
          >> ^!Find "</credit>" [BS]
          >> ^!Keyboard RIGHT
          >> ^!Keyboard CTRL+SHIFT+END
          >> ^!Keyboard DELETE
          >> ^!Keyboard CTRL+HOME
          >> ^!Find "<credit page"
          >> ^!Keyboard HOME
          >> ^!Keyboard SHIFT+CTRL+HOME
          >> ^!Keyboard DELETE
          >>
          >> ^!Menu Modify/Document to HTML/With Paragraph Tags
          >> ^!Copy All
          >> ^!Close Discard
          >
          > The reason I end up doing this rubbish way is because I get stuck in various parts of the Clip programming help file trying to find the bit that works for what I want. What do I select for all that down the file, for example. Can anyone, very quickly, replace the rubbish above with the better method they already understand. I know students call it 'spoonfeeding' but sometimes it gets you over the hill and becomes useful later.
          >
          >

          I sent out a five liner yesterday that did everything except strip the
          tags. If you give an example of the output format you want, getting it
          right is trivial.

          If you want to do it that way, you should experiment with some keyboard
          delays. I kept getting a half of credit> left behind when I was
          supposed to be on the next line and other little anomalies when I tried
          yours.

          I've now added a couple of lines.

          ^!Replace "(?s).*?(^ *\<credit page\="1"\>.*</credit>).*?\z" >> "$1" RAWS
          ^!Replace "\<.*?\>" >> "" RAWS
          ^!Replace "^ *" >> "" RAWS
          ^!Replace "\R\R+" >> "\r\n" RAWS
          ^!Menu Modify/Document to HTML/With Paragraph Tags
          ^!Select All
          ^!SetClipboard ^$GetSelection$
          ^!Close Discard
        • Don
          ... replace this with nothing using Regular Expressions: (?s).* K.*? z
          Message 4 of 5 , Nov 13, 2012
          • 0 Attachment
            On 11/13/2012 4:15 PM, Axel Berger wrote:
            > Adrian wrote:
            >> Can anyone, very quickly, replace the rubbish above
            >> with the better method.
            >
            > Funny enough I can't, and I'm surprised by that. ^!Jump and ^!Select
            > accept all kinds of parameters like LINE_START or TEXT_END, but not
            > ^!SelectTo. I find that very surprising, but there it is. The roW:col
            > notation for TEXT_START is obvious, but TEXT_END?
            >
            > I've not noticed this shortcoming, because I usually do it the other way
            > round. Instead of deleting the unwanted, I ^!Find the wanted and
            > ^!AppendToFile.
            >
            > Axel

            replace this with nothing using Regular Expressions:
            (?s).*\</credit\>\K.*?\z
          • Adrian
            ... I did a jump to the line end and then BOL which meant avoiding the return - allowed me to automatically create a filename from the title.
            Message 5 of 5 , Nov 13, 2012
            • 0 Attachment
              On 11/13/2012 4:15 PM, Axel Berger wrote:
              > > Adrian wrote:
              > >> Can anyone, very quickly, replace the rubbish above
              > >> with the better method.
              > >
              > > Funny enough I can't, and I'm surprised by that. ^!Jump and ^!Select
              > > accept all kinds of parameters like LINE_START or TEXT_END, but not
              > > ^!SelectTo. I find that very surprising, but there it is.

              I did a jump to the line end and then BOL which meant avoiding the return - allowed me to automatically create a filename from the title.
            Your message has been successfully submitted and would be delivered to recipients shortly.