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

Re: [Clip] Switch to new doc with same content

Expand Messages
  • Axel Berger
    ... I like using the standard Temp-folder too: ^$ExpandEnv( %temp% )$ ^$GetName(^$GetDocName$)$.tmp Note the backslash: While NotTab paths always end in a
    Message 1 of 9 , Jan 9, 2012
    • 0 Attachment
      Eb wrote:
      > You _could_ use ".tmp" to make that clear.

      I like using the standard Temp-folder too:

      ^$ExpandEnv("%temp%")$\^$GetName(^$GetDocName$)$.tmp

      Note the backslash: While NotTab paths always end in a backslash, DOS
      paths don't.

      Axel

      --
      Dipl.-Ing. F. Axel Berger Tel: +49/ 2174/ 7439 07
      Johann-Häck-Str. 14 Fax: +49/ 2174/ 7439 68
      D-51519 Odenthal-Heide eMail: Axel-Berger@...
      Deutschland (Germany) http://berger-odenthal.de
    • Axel Berger
      ... You could top that by closing and ^!OpenReadOnly Open the old file first and the new one last, so the new, temporary one is in focus. Axel -- Dipl.-Ing. F.
      Message 2 of 9 , Jan 9, 2012
      • 0 Attachment
        John Shotsky wrote:
        > I'd add a save first, in case it was modified beforehand.

        You could top that by closing and ^!OpenReadOnly

        Open the old file first and the new one last, so the new, temporary one
        is in focus.

        Axel

        --
        Dipl.-Ing. F. Axel Berger Tel: +49/ 2174/ 7439 07
        Johann-Häck-Str. 14 Fax: +49/ 2174/ 7439 68
        D-51519 Odenthal-Heide eMail: Axel-Berger@...
        Deutschland (Germany) http://berger-odenthal.de
      • anachromat
        ... Try replacing the middle two lines with: ^!TextToFile ^%NewFile% ^$GetText$ Here are the docs for GetText: Returns the whole text contained in the
        Message 3 of 9 , Jun 1, 2012
        • 0 Attachment
          --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
          >
          > I found a solution that seems to work. Not sure if it's
          > the most straightforward way to do it, but it works.
          > In case anyone else needs something like that:
          > ^!Set %NewFile%=^$GetDocName$.txt
          > ^!Select ALL
          > ^!TextToFile "^%NewFile%" ^$GetSelection$
          > ^!Open "^%NewFile%"

          Try replacing the middle two lines with:

          ^!TextToFile "^%NewFile%" ^$GetText$

          Here are the docs for GetText: "Returns the whole text contained in the active document."
        Your message has been successfully submitted and would be delivered to recipients shortly.