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

Two Views of the Same File

Expand Messages
  • Jim Hall
    Dr. Paul, Below is the Clip I use to View 2 copies of the same file. As written, if you have a document open in NoteTab an editable copy of it will be created
    Message 1 of 11 , Oct 8, 2002
    • 0 Attachment
      Dr. Paul,

      Below is the Clip I use to View 2 copies of the same file.

      As written, if you have a document open in NoteTab an editable copy of it will be created in the second window (on the right side)

      The original reference document on the left side will have a new name and will be write protected to make sure you can't edit the wrong file.

      When you finish editing the document on the right side, just "CLOSE" the reference document on the left side and it will disappear with no evidence of its existence left on the hard drive.

      It is annotated in the event that you might want to modify it for your personal needs.



      The Clip below can be copied from this Post to the Windows Clipboard and Added to the Current Library using the "Add from Clipboard" Command found in the Clipbook Pop Up menu (Right Click in Clipbook Window) or from the TOOLS|CLIPBOOK Menu.


      ______[Copy below this line]_______
      Edit Copy in Second Window

      ;Get Name of current document
      ^!Set %oldfilename%=^$GetDocName$
      ;Extract path info
      ^!Set %path%=^$Getpath(^%oldfilename%)$
      ;extract filename without path info
      ^!Set %filename%=^$GetFileName(^%oldfilename%)$
      ;Text to insert in old file name
      ^!Set %copy%="Original Copy of "
      ;Build new file name for the original copy
      ^!Set %newfilename%=^%path%
      ^!Append %newfilename%= ^%copy%
      ^!Append %newfilename%= ^%filename%
      ^!Save AS ^%newfilename%
      ;Make original copy read only
      ^!Keyboard Alt+D O
      ;Copy all text from file 1 in window 1
      ^!Toolbar Copy All
      ;Create file 2 and paste file 1 data to it
      ^!Toolbar Paste New
      ;Open second window with file 2 open in it
      ^!Keyboard Shift+Ctrl+W
      ;Move cursor to top of file
      ^!Keyboard Ctrl+Home
      ;Save the new document to the old document name
      ^!Save AS ^%oldfilename%
      ;Delete the "Original Copy of "reference copy from the hard drive
      ^!DeleteFile ^%newfilename%
      _____[Copy above this line]______
    • Sheri
      Hi Jim, Great idea, how to accomplish the task. If you wanted, you could update it to use a few of the newer Clip commands. Substituting the following between
      Message 2 of 11 , Oct 9, 2002
      • 0 Attachment
        Hi Jim,

        Great idea, how to accomplish the task.

        If you wanted, you could update it to use a few of the newer Clip
        commands. Substituting the following between your two Save commands
        avoids the Keyboard commands and doesn't disturb the clipboard.

        ;Make original copy read only
        ^!Menu Document/Read-Only
        ;Create file 2 with file 1 data in it
        ^!Menu File/New
        ^!InsertFile ^%newfilename%
        ;Open second window with file 2 open in it
        ^!Menu Document/Second Window
        ;Move cursor to top of file
        ^!Jump Doc_Start

        Regards,
        Sheri

        --- In ntb-clips@y..., Jim Hall <jehall@j...> wrote:
        > ;Get Name of current document
        > ^!Set %oldfilename%=^$GetDocName$
        > ;Extract path info
        > ^!Set %path%=^$Getpath(^%oldfilename%)$
        > ;extract filename without path info
        > ^!Set %filename%=^$GetFileName(^%oldfilename%)$
        > ;Text to insert in old file name
        > ^!Set %copy%="Original Copy of "
        > ;Build new file name for the original copy
        > ^!Set %newfilename%=^%path%
        > ^!Append %newfilename%= ^%copy%
        > ^!Append %newfilename%= ^%filename%
        > ^!Save AS ^%newfilename%
        > ;Make original copy read only
        > ^!Keyboard Alt+D O
        > ;Copy all text from file 1 in window 1
        > ^!Toolbar Copy All
        > ;Create file 2 and paste file 1 data to it
        > ^!Toolbar Paste New
        > ;Open second window with file 2 open in it
        > ^!Keyboard Shift+Ctrl+W
        > ;Move cursor to top of file
        > ^!Keyboard Ctrl+Home
        > ;Save the new document to the old document name
        > ^!Save AS ^%oldfilename%
        > ;Delete the "Original Copy of "reference copy from the hard drive
        > ^!DeleteFile ^%newfilename%
        > _____[Copy above this line]______
      • Jim Hall
        Sheri and all, ... I suppose I could, but I also use this Clip as a useful example when working with new Clip programmers 1 on 1 as it demonstrates the use of
        Message 3 of 11 , Oct 9, 2002
        • 0 Attachment
          Sheri and all,
          At 03:06 PM 10/9/02 +0000, you wrote:
          >Hi Jim,
          >
          >Great idea, how to accomplish the task.
          >
          >If you wanted, you could update it to use a few of the newer Clip
          >commands. Substituting the following between your two Save commands
          >avoids the Keyboard commands and doesn't disturb the clipboard.

          I suppose I could, but I also use this Clip as a useful example when
          working with new Clip programmers 1 on 1 as it demonstrates the use of
          basic file manipulation and keyboard commands that aren't/weren't covered
          in depth in the programming manual.

          As well, I don't write Clips for fun or to impress myself or others, only
          when I need to do something for which there is no ready command.

          My philosophy is that if it ain't broke - don't fix it.

          As written it does exactly what I need it to do and includes annotated
          examples of basic commands not otherwise found in the Samples and Utility
          Libraries which have proven to be useful to many new users when writing
          their own Clips.

          Regards,

          Jim
        • Sheri
          Far from trying to impress, I hope to spare new users a few real headaches. IMO Keyboard commands should be avoided wherever possible. They are subject to
          Message 4 of 11 , Oct 9, 2002
          • 0 Attachment
            Far from trying to impress, I hope to spare new users a few real
            headaches. IMO Keyboard commands should be avoided wherever
            possible. They are subject to misfiring on different machines due to
            timing differences. I would also point out to new users that copying
            the content of an entire file to the clipboard is unnecessary and
            could have deleterious effects, especially when applied to large
            files. At the very least, the clipboard should be cleared after such
            an operation.
          • Jim Hall
            Sheri, ... I commend you for your efforts. ... You certainly have the right to your opinion. Obviously not everyone agrees with all of them. :-) ... All
            Message 5 of 11 , Oct 9, 2002
            • 0 Attachment
              Sheri,

              At 06:31 PM 10/9/02 +0000, you wrote:
              >Far from trying to impress, I hope to spare new users a few real
              >headaches.

              I commend you for your efforts.

              >IMO Keyboard commands should be avoided wherever
              >possible.

              You certainly have the right to your opinion.

              Obviously not everyone agrees with all of them. :-)

              >They are subject to misfiring on different machines due to
              >timing differences.

              All machines have their own unique timing problems and they affect far more
              than just keyboard commands.
              It is just something that has to be dealt with when it is a problem
              regardless of the command involved.

              > I would also point out to new users that copying
              >the content of an entire file to the clipboard is unnecessary and
              >could have deleterious effects, especially when applied to large
              >files.

              The Clipboard is just a temporary file itself, as long as you have adequate
              disk space it isn't a problem if you can afford the time it takes to create
              the file. Most systems today have the capability to handle it in a timely
              fashion and most users are not editing extremely large text files.

              As you have suggested there is more than one way to do things and each
              person develops their own preferences and concerns based on their specific
              needs.

              In my 35 years of teaching students about Computers and Programming, I have
              found that a strong foundation in the basics is the best tool they can have
              for understanding and using the more complex commands and developing their
              own programming style and techniques.

              > At the very least, the clipboard should be cleared after such
              >an operation.

              Since I wrote this Clip to be able to copy and paste from the top of the
              file to the bottom of the same file, the clipboard is cleared per se with
              the first copy-paste I do.

              If you don't like this Clip or it won't do what you need, you are free to
              either not use it or to modify it to suit your own preferences and needs.

              I like it and it works just fine for me and what I use it for, just the way
              it is.

              Regards,

              Jim
            • Julie
              Hi Sheri, ... My biggest problem occurs when using the keyboard shortcuts with the Keyboard commands instead of the Menu options, or just using some of the
              Message 6 of 11 , Oct 9, 2002
              • 0 Attachment
                Hi Sheri,

                >If you wanted, you could update it to use a few of the newer Clip
                >commands. Substituting the following between your two Save commands
                >avoids the Keyboard commands and doesn't disturb the clipboard.

                My biggest problem occurs when using the keyboard shortcuts with the
                Keyboard commands instead of the Menu options, or just using some of the
                keyboard shortcuts assigned in the program. When I use shift+ctrl+P to turn
                on/off the pasteboard feature PaintShop Pro opens. Shift+ctrl+Q (Unquote
                Text) opens up QuickVerse :-). Oh well. For me the keyboard's quicker than
                the mouse!

                I do enjoy seeing how Clips can be accomplished in different ways :-).

                Julie,
                keyboard advocate <G>
              • Sheri
                Hi Julie, ... LOL! Are you listening Jim? Not only are Keyboard commands prone to timing issues, but also to user customization issues. How well are clips
                Message 7 of 11 , Oct 9, 2002
                • 0 Attachment
                  Hi Julie,

                  --- In ntb-clips@y..., Julie <jlg61@m...> wrote:
                  > My biggest problem occurs when using the keyboard shortcuts
                  > with the Keyboard commands instead of the Menu options, or
                  > just using some of the keyboard shortcuts assigned in the
                  > program. When I use shift+ctrl+P to turn on/off the
                  > pasteboard feature PaintShop Pro opens. Shift+ctrl+Q
                  > (Unquote Text) opens up QuickVerse :-). Oh well. For me the
                  > keyboard's quicker than the mouse!

                  LOL! Are you listening Jim? Not only are Keyboard commands prone to
                  timing issues, but also to user customization issues. How well are
                  clips dependent on set keystrokes to a Menu command going to work if
                  the user has reassigned that key to a different command via
                  Shortcuts.dat or Windows shortcuts? This may not matter for your own
                  private clips, but its a big compatibility issue for shared clips.

                  > I do enjoy seeing how Clips can be accomplished in different
                  > ways :-).

                  Thanks Julie <g>

                  Regards,
                  Sheri
                • Sheri
                  ... ??? Text on the Windows clipboard resides in memory, separate from your pasted file buffer. It can be pasted again and again until it is cleared. It stays
                  Message 8 of 11 , Oct 9, 2002
                  • 0 Attachment
                    --- In ntb-clips@y..., Jim Hall <jehall@j...> wrote:
                    > Since I wrote this Clip to be able to copy and paste from
                    > the top of the file to the bottom of the same file, the
                    > clipboard is cleared per se with the first copy-paste I do.

                    ???

                    Text on the Windows clipboard resides in memory, separate from your
                    pasted file buffer. It can be pasted again and again until it is
                    cleared. It stays on the clipboard even after Notetab is closed
                    unless you arbitrarily use it for copying some other text there. And
                    if a large amount of text is on it, it weighs on performance when if
                    virtual memory consequently comes into play.

                    Regards,
                    Sheri
                  • Basil Barnes
                    Hi: I m an absolute newbie at using Note Tab (although an old hand at using computers), and I m having a little trouble getting started. I have Note Tab Pro,
                    Message 9 of 11 , Oct 10, 2002
                    • 0 Attachment
                      Hi:

                      I'm an absolute newbie at using Note Tab (although an old hand at using
                      computers), and I'm having a little trouble getting started. I have Note
                      Tab Pro, and all the talk about clips and so on assume that I know how to
                      write a clip, where to put it and even how to activate it.

                      Is there a programming manual or something similar available that will take
                      somebody such as myself from zero to 100 kmh in 5 seconds? I'm sure that
                      once I'm brought up to speed, so to speak, I'll be able to understand what
                      everybody is talking about.

                      How on earth does one get started?

                      Basil Barnes

                      ----------


                      ---
                      Outgoing mail is certified Virus Free.
                      Checked by AVG anti-virus system (http://www.grisoft.com).
                      Version: 6.0.394 / Virus Database: 224 - Release Date: 3/10/2002


                      [Non-text portions of this message have been removed]
                    • Sheri
                      Hi Basil, You will want to read through the Clip Basics topic in Notetab Main help file as well as all the topics in the separate Clipcode help file (see
                      Message 10 of 11 , Oct 10, 2002
                      • 0 Attachment
                        Hi Basil,

                        You will want to read through the Clip Basics topic in Notetab Main
                        help file as well as all the topics in the separate Clipcode help
                        file (see Help|Help on Clip Programming). I would also advise
                        activating the Clip Assistant in the Quick List (toggle on
                        Tools|Quick List, then select Clip Assistant under Tools|Quick List
                        Properties). This allows you to create clips without knowing the
                        syntax by heart.

                        For answers to your most basic orientation questions, I would suggest
                        you download Jim Hall's Basic Clip Basics (despite my recent
                        disagreements with Jim Hall, I think that's a nice graphical
                        introduction to navigating Clips).

                        http://www.jimbow.com/basicclipbasics.zip

                        Jody Adair's Clip Class is a great tutorial, but I believe it needs
                        to be updated to include the latest commands and functions. In
                        particular, you should be aware that ^!Menu commands now give direct
                        access to some Notetab features which were previously accessible only
                        with ^!Keyboard commands.

                        http://www.notetab.net/zip/clipclass.zip

                        Regards,
                        Sheri
                      • Jody
                        Hi Sheri and Jim, In a rush... ^!SetClipboard ^%Empty% should do it. (Or, ^!SaveClipboard/RestoreClipboard ???) Also, in short, I think both of you have valid
                        Message 11 of 11 , Oct 10, 2002
                        • 0 Attachment
                          Hi Sheri and Jim,

                          In a rush... ^!SetClipboard ^%Empty% should do it. (Or,
                          ^!SaveClipboard/RestoreClipboard ???)

                          Also, in short, I think both of you have valid issues overall,
                          especially when Jim mentioned a solid foundation. I've only
                          taught for maybe 5 years in various environments, but do know for
                          sure that the foundation must be built and solid to get a good
                          understand of the rest.

                          Most people that start my ClipClass bail out around lessons 4-5,
                          because from there they can figure out the rest by simply reading
                          Help on Clip programming as needed and going through the index of
                          commands and functions.

                          I also agree with the use of the ^!Keyboard command Sheri, but
                          yet there are times when it is definitely needed as you know
                          already. Like Jim said though, that is not the only issue with
                          timing. The use of ^!FocusApp, ^$GetAppTitle$ ^$SrtCopy(...)$,
                          and more of the related commands/functions definitely have timing
                          issues as you know, but you will also find that that it is a must
                          to use ^!Keyboard and find at times it will interfere with other
                          shortcuts.

                          So much for a short in a rush post... got lots of mail to answer.
                          See ya later... ;)

                          >--- In ntb-clips@y..., Jim Hall <jehall@j...> wrote:
                          >> Since I wrote this Clip to be able to copy and paste from
                          >> the top of the file to the bottom of the same file, the
                          >> clipboard is cleared per se with the first copy-paste I do.
                          >
                          >???
                          >
                          >Text on the Windows clipboard resides in memory, separate from your
                          >pasted file buffer. It can be pasted again and again until it is
                          >cleared. It stays on the clipboard even after Notetab is closed
                          >unless you arbitrarily use it for copying some other text there. And
                          >if a large amount of text is on it, it weighs on performance when if
                          >virtual memory consequently comes into play.


                          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
                        Your message has been successfully submitted and would be delivered to recipients shortly.