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

[Clip] Re: Insert mode

Expand Messages
  • RS
    Hi Ray, ... That s a very smart clip! Since it s being slowed down by having to open and close a new document, all you need to do is use the current document
    Message 1 of 7 , Jun 22, 1999
      Hi Ray,

      At 06:08 PM 06/21/99 -0500, you wrote:

      >So here's a small clip that also switches to insert
      >mode if necessary. It works fine but runs relatively
      >slowly. Anyone see a way to rewrite or streamline
      >it?


      That's a very smart clip!

      Since it's being slowed down by having to open and close a new document,
      all you need to do is use the current document and then clean after.

      To simplify matters here, I use the end of the line to do the testing, and
      then restore the cursor to its previous position.

      ;=============================
      H="InsertMode"

      ^!SetScreenUpdate OFF
      ^!Set %col%=^$GetCol$
      ^!MoveCursor ^$StrSize(^$GetLine$)$
      ^!InsertText " ab"
      ^!MoveCursor -1
      ^!Keyboard #12#
      ^!MoveCursor +1

      ^!IfSame "^$GetBlock$" "a12b" Next1
      ^!Set %i%=4
      ^!Keyboard INSERT
      ^!Goto Next2


      :Next1
      ^!Set %i%=5
      :Next2
      ^!Keyboard ^$StrFill("Backspace ";^%i%)$
      ^!SetCursor ^$GetRow$:^%col%
      ^!SetScreenUpdate ON
      ;=============================



      Regards,


      RS


      ======================================================
      Coming soon

      ClipWriter 1.0

      http://home.att.net/~ptools/ClipWriter/cw.htm

      http://home.att.net/~ptools/main/index.htm




      ======================================================







      ======================================================

      ------------------------------------------------------------------------

      eGroups.com home: http://www.egroups.com/group/ntb-clips
      http://www.egroups.com - Simplifying group communications
    • Raymond Fitzgerald
      Hi RS, ... all you need to do is use the current document and then clean after. Thanks very much for your help! Your clip is noticeably faster! Turns out we
      Message 2 of 7 , Jun 22, 1999
        Hi RS,

        >>Anyone see a way to rewrite or streamline it?

        >Since it's being slowed down by having to open and close a new document,
        all you need to do is use the current document and then clean after.

        Thanks very much for your help! Your clip is noticeably faster! Turns out we
        don't need to turn screen updating back on because it does so automatically
        at clip end.

        Here is what I'm going with, which is your clip with slight modifications.
        Such as replacing backspace with undo so that an unmodified document remains
        unmodified. (I didn't know we could put keystrokes in StrFill!).

        H="Insert mode"
        ^!SetScreenUpdate OFF
        ^!Set %Pos%=^$GetRow$:^$GetCol$
        ^!Jump LINE_END
        ^!InsertText " ab"
        ^!MoveCursor -1
        ^!Keyboard #12#
        ^!Jump LINE_END

        ^!IfSame "^$GetBlock$" "a12b" Next1
        ^!Set %i%=3
        ^!Keyboard INSERT
        ^!Goto Next2

        :Next1
        ^!Set %i%=2

        :Next2
        ^!Keyboard ^$StrFill("Ctrl+Z ";^%i%)$
        ^!Jump LINE_START
        ^!SetCursor ^%Pos%

        Thanks again,
        Ray

        ------------------------------------------------------------------------

        eGroups.com home: http://www.egroups.com/group/ntb-clips
        http://www.egroups.com - Simplifying group communications
      • Jody
        Hi Raymond, ... I m curious, what would you use this for? I haven t tried it because I have no use for it that I know of, do I? Bye for now, Jody Adair Prov.
        Message 3 of 7 , Jun 22, 1999
          Hi Raymond,

          >H="Insert mode"
          >^!SetScreenUpdate OFF
          >^!Set %Pos%=^$GetRow$:^$GetCol$

          I'm curious, what would you use this for? I haven't tried it
          because I have no use for it that I know of, do I?

          Bye for now,
          Jody Adair
          Prov. 3:5-7; 4:23

          http://www.sureword.com/sojourner
          http://www.sureword.com/kjb1611
          http://www.sureword.com/notetab

          ------------------------------------------------------------------------

          eGroups.com home: http://www.egroups.com/group/ntb-clips
          http://www.egroups.com - Simplifying group communications
        • Raymond Fitzgerald
          Hi Jody, ... You remember that post of mine from June 15 titled Template clipcode ... For which, BTW, nobody responded to my question, Anyone else have any
          Message 4 of 7 , Jun 23, 1999
            Hi Jody,

            >>H="Insert mode"
            >
            >I'm curious, what would you use this for? I haven't tried it
            >because I have no use for it that I know of, do I?

            You remember that post of mine from June 15 titled "Template clipcode
            applications"?:

            >Anyway, I needed to create a "front-end" that would take user input of
            >various figures, automatically calculate the difference between those and
            >previous days' figures, also calculate the percentage difference, and
            >display unchanged amounts in black, negative amounts in red, and positive
            >amounts in green (in an HTML file of course).

            For which, BTW, nobody responded to my question, "Anyone else have any neat
            applications?" That's OK, I've got one more to tell y'all about.

            Anyway, I've got a clip in that same library that jumps from field to field
            and recalculates values if the user needs to revise some figures. It
            wouldn't work right in insert mode, so initially I included a prompt to
            remind the user to turn it off. But they complained, rightfully so, about
            the extra step! So that inspired me to write the clip and eliminate the
            prompt.

            Cheers,
            Ray

            ------------------------------------------------------------------------

            eGroups.com home: http://www.egroups.com/group/ntb-clips
            http://www.egroups.com - Simplifying group communications
          • RS
            Hi Ray, ... You are welcome. ... Good idea! Works beautifully. Regards, RS ====================================================== Coming soon ClipWriter 1.0
            Message 5 of 7 , Jun 23, 1999
              Hi Ray,

              At 04:17 PM 06/22/99 -0500, you wrote:

              >Thanks very much for your help!

              You are welcome.

              >Here is what I'm going with, which is your clip
              >with slight modifications. Such as replacing
              >backspace with undo so that an unmodified
              >document remains unmodified.

              Good idea! Works beautifully.



              Regards,


              RS


              ======================================================
              Coming soon

              ClipWriter 1.0

              http://home.att.net/~ptools/ClipWriter/cw.htm

              http://home.att.net/~ptools/main/index.htm




              ======================================================







              ======================================================

              ------------------------------------------------------------------------

              eGroups.com home: http://www.egroups.com/group/ntb-clips
              http://www.egroups.com - Simplifying group communications
            • Jody
              Hi Raymond, ... Yes. :) ... I never used Templates (except to see if I wanted to); I never had a reason to. I find the Clipbook and other features in NoteTab
              Message 6 of 7 , Jun 23, 1999
                Hi Raymond,

                > You remember that post of mine from June 15 titled "Template
                > clipcode applications"?:

                Yes. :)

                > For which, BTW, nobody responded to my question, "Anyone else
                > have any neat applications?" That's OK, I've got one more to
                > tell y'all about.

                I never used Templates (except to see if I wanted to); I never
                had a reason to. I find the Clipbook and other features in
                NoteTab does all I need when speaking of the template topic.

                > Anyway, I've got a clip in that same library that jumps from
                > field to field and recalculates values if the user needs to
                > revise some figures.

                OK, thanks - now I know there is a reason for it. Strange something
                like that would cause it not to work.

                Bye for now,
                Jody Adair
                Prov. 3:5-7; 4:23

                http://www.sureword.com/sojourner
                http://www.sureword.com/kjb1611
                http://www.sureword.com/notetab

                ------------------------------------------------------------------------

                eGroups.com home: http://www.egroups.com/group/ntb-clips
                http://www.egroups.com - Simplifying group communications
              • Raymond Fitzgerald
                Hi Jody, ... No no--that s not what I meant. Only that this particular clip and template require the usual overwrite mode and not the insert mode. Solely due
                Message 7 of 7 , Jun 23, 1999
                  Hi Jody,

                  >> Anyway, I've got a clip in that same library that jumps from
                  >> field to field and recalculates values if the user needs to
                  >> revise some figures.
                  >
                  >OK, thanks - now I know there is a reason for it. Strange something
                  >like that would cause it not to work.

                  No no--that's not what I meant. Only that this particular clip and template
                  require the usual overwrite mode and not the insert mode. Solely due to the
                  differences in the two modes. That's all.

                  Cheers,
                  Ray

                  ------------------------------------------------------------------------

                  eGroups.com home: http://www.egroups.com/group/ntb-clips
                  http://www.egroups.com - Simplifying group communications
                Your message has been successfully submitted and would be delivered to recipients shortly.