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

Re: [peditors] Scripting text selection

Expand Messages
  • John Markley
    ... Hi Jose - Some time ago I wrote such a pScript (actually it is two pScripts) exactly for such a purpose, and I use them fairly frequently. I may even have
    Message 1 of 22 , Jun 20, 2008
    • 0 Attachment
      Quoting fjmancho <fjmancho@...>:

      > Hi John and all,
      >
      > I have being thinking for some days now how to select (highlighting) text
      > that doesn't fit to the normal patterns (word, line, paragraph and so).
      > I was hoping that a pScript could do that but I don't find any function for
      > this.
      >
      > My main problem is to select text twice or trice longer than the screen of
      > the palm. There are so many possibilities of commiting mistakes.
      >
      > Is there any way of selecting text from a given point in the text to
      > another? Is there any pScriptorial function for this?
      >
      >
      > I don't currently have pEdit and so am limited to pTools.
      >
      > Regrads,
      >
      > Jose

      Hi Jose -

      Some time ago I wrote such a pScript (actually it is two pScripts)
      exactly for such a purpose, and I use them fairly frequently. I may
      even have posted them here, not sure. You put the cursor at the start
      of the text to be captured and run "COPY START". Then put the cursor
      at the end of the text to be captured (take your time, no time limit)
      and run "COPY FINISH". The text is now in your clipboard. I
      experimented, successfully, with combining them into one pScript but
      abandoned it even though it worked because that required having a time
      limit during which the second cursor placement had to be made, and it
      was always too long or too short. Two separate pScripts are much
      better and more fail-safe.


      {COPY START::
      /&ifAbort@[$^==0]
      /!/$c/&varSet@[$4,$$]
      /&mess [@@MARKED@@,,040]}



      {COPY FINISH::
      /&ifAbort@[$^==0]
      /!/$c
      /&varSet@[$5,$$]
      /&varAdd@[$5,-$4]
      /&varSubStr@[$B,$^,$4,$5]
      /&clipAdd i[$B]
      /&mess [@@COPIED@@,,040]}


      Let me know if this does what you want.

      Regards, ~ John
    • fjmancho
      Hi John and all, I have being thinking for some days now how to select (highlighting) text that doesn t fit to the normal patterns (word, line, paragraph and
      Message 2 of 22 , Jun 20, 2008
      • 0 Attachment
        Hi John and all,

        I have being thinking for some days now how to select (highlighting) text
        that doesn't fit to the normal patterns (word, line, paragraph and so).
        I was hoping that a pScript could do that but I don't find any function for
        this.

        My main problem is to select text twice or trice longer than the screen of
        the palm. There are so many possibilities of commiting mistakes.

        Is there any way of selecting text from a given point in the text to
        another? Is there any pScriptorial function for this?


        I don't currently have pEdit and so am limited to pTools.




        Regrads,

        Jose
      • John Markley
        Hi Jose and all- The {COPY FINISH:: pScript I posted earlier is written to initialize the clipboard, so that only the text selected by the COPY START - COPY
        Message 3 of 22 , Jun 20, 2008
        • 0 Attachment
          Hi Jose and all-

          The {COPY FINISH:: pScript I posted earlier is written to
          initialize the clipboard, so that only the text selected by the COPY
          START - COPY FINISH combo will be in the clipboard. It just occurred
          to me that it might be handy to have an append-to-clipboard version
          too, so here it is. There is only one tiny change from the COPY
          FINISH pScript, other than changing the name and the message, and that
          is to remove the "i" (initialize) from "/&clipAdd i[$B]". You still
          use the same COPY START pScript first, but then use APPEND FINISH
          instead of COPY FINISH. Then the text circumscribed by cursor-COPY
          START to cursor-APPEND FINSH will be appended to whatever is already
          in the clipboard. So you can use COPY START-COPY FINISH to capture
          one block of text, and then COPY START-APPEND FINISH to add as many
          other blocks of text as you like, from the same or from different
          documents. :)


          {APPEND FINISH::
          /&ifAbort@[$^==0]
          /!/$c
          /&varSet@[$5,$$]
          /&varAdd@[$5,-$4]
          /&varSubStr@[$B,$^,$4,$5]
          /&clipAdd [$B]
          /&mess [@@APPENDED@@,,040]}

          ~ John
        • fjmancho
          ...... Original Message ....... ... Sorry, it is not exactly that what I am looking for. I saw these two pscripts in one of your posts sometime ago and I am
          Message 4 of 22 , Jun 20, 2008
          • 0 Attachment
            ...... Original Message .......
            On Fri, 20 Jun 2008 15:14:25 -0400 John Markley <jmmjr@...> wrote:
            >
            >Let me know if this does what you want.
            >

            Sorry, it is not exactly that what I am looking for. I saw these two
            pscripts in one of your posts sometime ago and I am using them almost
            dayly. They have been really useful for me.


            I was wondering whether it is possible to *only* highlight (highlight) the
            text so that you have it available for further operations.

            I was also thinking of something following the system of those two pScripts
            of yours: that is marking the beginning and the end of the text to be
            selected ($c might be useful for it). The problem is that when you have
            defined the two points in the text I cannot figure a way of highlighting
            it. It can be send to the clipboard, it can be store in a variable, but
            some times I would like it highlighted so that it is possible to change the
            case for example or to html-tag it (that is mainly what I do with some
            psctipts which work on highlighted text, and most of the times are big text)


            Thanks,

            Jose
          • John Markley
            ... Hmmm. Difficult. Will think about. ~ John
            Message 5 of 22 , Jun 21, 2008
            • 0 Attachment
              Quoting fjmancho <fjmancho@...>:


              > Sorry, it is not exactly that what I am looking for. I saw these two
              > pscripts in one of your posts sometime ago and I am using them almost
              > dayly. They have been really useful for me.
              >
              >
              > I was wondering whether it is possible to *only* highlight (highlight) the
              > text so that you have it available for further operations.
              >
              > I was also thinking of something following the system of those two pScripts
              > of yours: that is marking the beginning and the end of the text to be
              > selected ($c might be useful for it). The problem is that when you have
              > defined the two points in the text I cannot figure a way of highlighting
              > it. It can be send to the clipboard, it can be store in a variable, but
              > some times I would like it highlighted so that it is possible to change the
              > case for example or to html-tag it (that is mainly what I do with some
              > psctipts which work on highlighted text, and most of the times are big text)
              >
              >
              > Thanks,
              >
              > Jose

              Hmmm. Difficult. Will think about.
              ~ John
            • fjmancho
              ...... Original Message ....... ... I ll be happy if you come up with one of your great ideas. Let me know. Jose
              Message 6 of 22 , Jun 21, 2008
              • 0 Attachment
                ...... Original Message .......
                On Sat, 21 Jun 2008 09:30:52 -0400 John Markley <jmmjr@...> wrote:

                >
                >Hmmm. Difficult. Will think about.
                > ~ John
                >
                I'll be happy if you come up with one of your great ideas. Let me know.

                Jose
              • John Markley
                ... Hi Jose- The only way I can think of, so far, to get an arbitrary block of text highlighted is to use a pSearchTool find, which results in highlighted
                Message 7 of 22 , Jun 21, 2008
                • 0 Attachment
                  Quoting fjmancho <fjmancho@...>:
                  > ...... Original Message .......
                  > On Sat, 21 Jun 2008 09:30:52 -0400 John Markley <jmmjr@...> wrote:
                  >
                  >> Hmmm. Difficult. Will think about.
                  >> ~ John
                  >>
                  > I'll be happy if you come up with one of your great ideas. Let me know.
                  >
                  > Jose

                  Hi Jose-

                  The only way I can think of, so far, to get an arbitrary block of
                  text highlighted is to use a pSearchTool find, which results in
                  highlighted text. It seems that one way would be to use RegExp, but I
                  haven't been able yet to formulate the correct expression. However,
                  there is another way that does work, and the pScript is below. *But*,
                  there is a catch, which is the reason I tried RegExp (unsuccessfully
                  so far), which is that the Find line of pSearchTool has a 255
                  character limit. You have said you want to highlight large chunks of
                  text. The pScript below will work for up to 255 character chunks, no
                  larger. You use the pScript by marking the start of what you want to
                  highlight with the same "COPY START" pScript as before. Then put the
                  cursor at the end of the text to be highlighted and run the HIGHLIGHT
                  pScript below. For chunks of text larger than 255 char you could do
                  repeat runs of the COPY START-HIGHLIGHT sequence.

                  {HIGHLIGHT::
                  /&ifAbort@[$^==0]
                  /!/$c
                  /&varSet@[$5,$$]
                  /&varAdd@[$5,-$4]
                  /&varSubStr@[$B,$^,$4,$5]
                  /&clipAdd i[$B]
                  /&mess [@@COPIED@@,,040]
                  /&script$[@@highlight0@@]}
                  {highlight0::
                  /&specAct[8]
                  /&script$[@@highlight1@@]}
                  {highlight1::
                  /xc P
                  /&script$[@@highlight2@@]}
                  {highlight2::
                  /!/$f
                  /&ifScript@[$$==12000,@@highlight3@@]
                  /&ifScript@[$$!=12000,@@highlight4@@]}
                  {highlight3::
                  /5s
                  /&script$[@@highlight4@@]}
                  {highlight4::
                  /xEpst f
                  /xEpst d}

                  ~ John
                • dmccunney
                  ... I have no idea whether this is doable with a pscript, but I d look at defining a hard key or stroke as a block marker, and another as a Done operator The
                  Message 8 of 22 , Jun 21, 2008
                  • 0 Attachment
                    On Sat, Jun 21, 2008 at 10:47 PM, John Markley <jmmjr@...> wrote:

                    > The only way I can think of, so far, to get an arbitrary block of
                    > text highlighted is to use a pSearchTool find, which results in
                    > highlighted text. It seems that one way would be to use RegExp, but I
                    > haven't been able yet to formulate the correct expression. However,
                    > there is another way that does work, and the pScript is below. *But*,
                    > there is a catch, which is the reason I tried RegExp (unsuccessfully
                    > so far), which is that the Find line of pSearchTool has a 255
                    > character limit.

                    I have no idea whether this is doable with a pscript, but I'd look at
                    defining a hard key or stroke as a block marker, and another as a Done
                    operator

                    The marker would be state related: the first time you place it, it
                    marks start of block and sets a variable indicating it has been
                    invoked. The second time, it unsets the variable. Put the cursor at
                    the beginning of the desired block. Press the key/draw the stroke.
                    Move the the desired end point. Press the key/draw the stroke.
                    Everything between the marks is considered the desired block. The
                    marker can be the same (presumably non-ASCII) char. The script simply
                    considers anything between the chars a block.

                    Actually highlighting on screen would be another matter. I'd settle
                    for the markers to be visible, so I could confirm start and end were
                    where I wanted. I would then perform whatever operation was desired
                    on the block, and press the Done button. Done would delete the marks
                    and unset any relevant variables.

                    And thinking about it, the same button/stroke might serve all three purposes:

                    First press, mark start of block.
                    Second press, mark end of block.
                    Third press, Terminate block operations and reset.

                    You would need a variable or two to hold the state, but that shouldn't
                    be a big deal.

                    Doable in a pscript?
                    ______
                    Dennis
                    (Who is suddenly tempted to request code folding in pedit... :-) )
                  • John Markley
                    ... ... Well, in fact, although I did say The only way I can think of, so far, to get an arbitrary block of text highlighted is to use a pSearchTool
                    Message 9 of 22 , Jun 22, 2008
                    • 0 Attachment
                      Quoting dmccunney <dennis.mccunney@...>:

                      > On Sat, Jun 21, 2008 at 10:47 PM, John Markley <jmmjr@...> wrote:
                      >
                      >> The only way I can think of, so far, to get an arbitrary block of
                      >> text highlighted is to use a pSearchTool find, which results in
                      >> highlighted text.

                      <<SNIP>>
                      >
                      > I have no idea whether this is doable with a pscript, but I'd look at
                      > defining a hard key or stroke as a block marker, and another as a Done
                      > operator
                      >
                      > The marker would be state related: the first time you place it, it
                      > marks start of block and sets a variable indicating it has been
                      > invoked. The second time, it unsets the variable. Put the cursor at
                      > the beginning of the desired block. Press the key/draw the stroke.
                      > Move the the desired end point. Press the key/draw the stroke.
                      > Everything between the marks is considered the desired block. The
                      > marker can be the same (presumably non-ASCII) char. The script simply
                      > considers anything between the chars a block.
                      >
                      > Actually highlighting on screen would be another matter. I'd settle
                      > for the markers to be visible, so I could confirm start and end were
                      > where I wanted. I would then perform whatever operation was desired
                      > on the block, and press the Done button. Done would delete the marks
                      > and unset any relevant variables.
                      >
                      > And thinking about it, the same button/stroke might serve all three purposes:
                      >
                      > First press, mark start of block.
                      > Second press, mark end of block.
                      > Third press, Terminate block operations and reset.
                      >
                      > You would need a variable or two to hold the state, but that shouldn't
                      > be a big deal.
                      >
                      > Doable in a pscript?
                      > ______
                      > Dennis

                      Well, in fact, although I did say "The only way I can think of, so
                      far, to get an arbitrary block of text highlighted is to use a
                      pSearchTool find", what that really means is the only way I've been
                      able to make it work properly. The process you describe above is
                      exactly what I've worked on, in three different sets of pScripts using
                      differing ways of marking, etc. In fact, if you look at the COPY
                      START-HIGHLIGHT pScript combo I posted you'll see that in fact it does
                      what you've described, using the unique positions of the start and end
                      cursor saved in pVariables as the markers, and pSearchTool Find as the
                      highlighter. There is no problem at all with various strategies to
                      place and activate markers and delineate text blocks. The problem is
                      always with getting the delineated block highlighted, as there is no
                      token/function/expression that does that. The block can be copied,
                      captured, deleted, modified, but not highlighted. It's the act of
                      highlighting, once the text has been delineated, that so far only
                      responds to using a pSearchTool Find.
                      ~ John
                    • John Markley
                      ... Yes. ~ John
                      Message 10 of 22 , Jun 22, 2008
                      • 0 Attachment
                        Quoting fjmancho <fjmancho@...>:


                        > I see the point of regEx. I think the problem is that they don't go beyond
                        > the end of line character, is't it?

                        Yes.

                        ~ John
                      • fjmancho
                        I had a busy Sunday that, thanks God, is over. I got up early in the morning and I came back just a few minutes ago. Thank you for your answers. I knew someone
                        Message 11 of 22 , Jun 22, 2008
                        • 0 Attachment
                          I had a busy Sunday that, thanks God, is over. I got up early in the
                          morning and I came back just a few minutes ago.

                          Thank you for your answers.

                          I knew someone would come up with a brillant idea. I will try it this week.


                          Both John and Dennis agree (with either ASCII marker or not). At the end
                          you get a block of text you have to highlight. I rether prefer it
                          highlighted than "connected" to other pscripts. I believe it to be more
                          flexible for further working either with other pscripts or pEditTool.

                          I see the point of regEx. I think the problem is that they don't go beyond
                          the end of line character, is't it?

                          I need "my time" as I am not a high-tech man. For sure I let you know.

                          Regrads,


                          Jose
                        • dmccunney
                          ... If you have an actual marker char to delineate the block, it needs to be a char that won t appear *in* the block. That s why I assumed a non-ASCII char.
                          Message 12 of 22 , Jun 22, 2008
                          • 0 Attachment
                            On Sun, Jun 22, 2008 at 1:06 PM, fjmancho <fjmancho@...> wrote:

                            > Both John and Dennis agree (with either ASCII marker or not). At the end
                            > you get a block of text you have to highlight. I rether prefer it
                            > highlighted than "connected" to other pscripts. I believe it to be more
                            > flexible for further working either with other pscripts or pEditTool.

                            If you have an actual marker char to delineate the block, it needs to
                            be a char that won't appear *in* the block. That's why I assumed a
                            non-ASCII char.

                            If you use John's idea of variables pointing the starting and ending
                            positions, that concern goes away.

                            I made no assumption of connection to another pscript. My question is
                            how badly you need the highlighting. I'd settle for the marker being
                            visible (if an actual char in the text) so that I could confirm start
                            and end were in the desired places.

                            Just what do you need to *do* with the highlighted block?

                            > I see the point of regEx. I think the problem is that they don't go beyond
                            > the end of line character, is't it?

                            Correct.

                            > Jose
                            ______
                            Dennis
                          • dmccunney
                            ... OK, we were thinking in similar lines. Is sounds rather like what is needed is a ptoolset enhancement to highlight a marked block that can be called from
                            Message 13 of 22 , Jun 22, 2008
                            • 0 Attachment
                              On Sun, Jun 22, 2008 at 8:52 AM, John Markley <jmmjr@...> wrote:
                              > Well, in fact, although I did say "The only way I can think of, so
                              > far, to get an arbitrary block of text highlighted is to use a
                              > pSearchTool find", what that really means is the only way I've been
                              > able to make it work properly. The process you describe above is
                              > exactly what I've worked on, in three different sets of pScripts using
                              > differing ways of marking, etc. In fact, if you look at the COPY
                              > START-HIGHLIGHT pScript combo I posted you'll see that in fact it does
                              > what you've described, using the unique positions of the start and end
                              > cursor saved in pVariables as the markers, and pSearchTool Find as the
                              > highlighter. There is no problem at all with various strategies to
                              > place and activate markers and delineate text blocks. The problem is
                              > always with getting the delineated block highlighted, as there is no
                              > token/function/expression that does that. The block can be copied,
                              > captured, deleted, modified, but not highlighted. It's the act of
                              > highlighting, once the text has been delineated, that so far only
                              > responds to using a pSearchTool Find.

                              OK, we were thinking in similar lines. Is sounds rather like what is
                              needed is a ptoolset enhancement to highlight a marked block that can
                              be called from a pscript.

                              Do things change if pedit is in the mix?

                              > ~ John
                              ______
                              Dennis
                            • John Markley
                              ... ~ John ... Completely. The ability to do what Jose wants is built in to peditPro and is very easy. But it does not exist in pToolSet/pEditTool. In pedit,
                              Message 14 of 22 , Jun 22, 2008
                              • 0 Attachment
                                Quoting dmccunney <dennis.mccunney@...>:


                                > Do things change if pedit is in the mix?
                                ~ John
                                > ______
                                > Dennis

                                Completely. The ability to do what Jose wants is built in to peditPro
                                and is very easy. But it does not exist in pToolSet/pEditTool. In
                                pedit, open a memo, then

                                1) put the cursor at the start of what you want to highlight.
                                2) menu/Na/SetMarker, or ESC@, or menu@, or in a pScript xEpro @
                                3) put the cursor at the end of the target block of text.
                                4) open the pedit symmetric selector (S button) and tap/select the
                                "Marker" button.
                                5) voila!


                                ~ John
                              • fjmancho
                                ...... Original Message ....... On Sun, 22 Jun 2008 13:13:30 -0400 dmccunney ... I know. that was a personal consideration on my
                                Message 15 of 22 , Jun 22, 2008
                                • 0 Attachment
                                  ...... Original Message .......
                                  On Sun, 22 Jun 2008 13:13:30 -0400 dmccunney <dennis.mccunney@...>
                                  wrote:

                                  >I made no assumption of connection to another pscript.

                                  I know. that was a personal consideration on my own problem.

                                  >My question is
                                  >how badly you need the highlighting.


                                  What I want to do is to tag blocks of texts with HTML tags. Very simple
                                  things like: <b></p> <p></p> <!-- -->; which sometimes involve small
                                  texts and sometimes very big ones.
                                  I have some simple pscripts for that. I would like to be able to work with
                                  them either if I highlight manualy (small blocks) or very big texts (longer
                                  than the screen; my problem is that when the text is long I commit plenty
                                  of mistakes if I do it manualy)



                                  >Just what do you need to *do* with the highlighted block?
                                  >

                                  I believe (no experience really) that leaving it highlighted you have a bit
                                  more of flexibility. That is: you can get other pscripts working with it;
                                  you can cancel the operation easily; the text is ready for further
                                  pEditTool actions (Two extra characters might complicate the process in
                                  this case).

                                  The problem is -as John says in one of the next e-mails- that I don't have
                                  pedit or peditPro. With pedit there is no problem.


                                  Jose
                                • dmccunney
                                  ... An argument for set start marker/set end marker. ... What sort of actions? Highlighting is a visual indicator for *you*, enabling you to confirm the
                                  Message 16 of 22 , Jun 22, 2008
                                  • 0 Attachment
                                    On Sun, Jun 22, 2008 at 3:20 PM, fjmancho <fjmancho@...> wrote:
                                    > ...... Original Message .......
                                    > On Sun, 22 Jun 2008 13:13:30 -0400 dmccunney <dennis.mccunney@...>
                                    > wrote:
                                    >
                                    >>I made no assumption of connection to another pscript.
                                    >
                                    > I know. that was a personal consideration on my own problem.
                                    >
                                    >>My question is
                                    >>how badly you need the highlighting.
                                    >
                                    > What I want to do is to tag blocks of texts with HTML tags. Very simple
                                    > things like: <b></p> <p></p> <!-- -->; which sometimes involve small
                                    > texts and sometimes very big ones.
                                    > I have some simple pscripts for that. I would like to be able to work with
                                    > them either if I highlight manualy (small blocks) or very big texts (longer
                                    > than the screen; my problem is that when the text is long I commit plenty
                                    > of mistakes if I do it manualy)

                                    An argument for set start marker/set end marker.

                                    >>Just what do you need to *do* with the highlighted block?
                                    >
                                    > I believe (no experience really) that leaving it highlighted you have a bit
                                    > more of flexibility. That is: you can get other pscripts working with it;
                                    > you can cancel the operation easily; the text is ready for further
                                    > pEditTool actions (Two extra characters might complicate the process in
                                    > this case).

                                    What sort of actions? Highlighting is a visual indicator for *you*,
                                    enabling you to confirm the boundaries of the block. It won't be
                                    needed by what will work with the block. All anything else needs to
                                    know is where the block begins and ends.

                                    Text editors I use on other systems will highlight marked blocks, but
                                    that's purely an operator convenience. The editor knows where the
                                    block begins and ends through the start and end marks, and doesn't
                                    need the highlight to correctly operate on the block.

                                    > The problem is -as John says in one of the next e-mails- that I don't have
                                    > pedit or peditPro. With pedit there is no problem.

                                    Sound like you might want to get it at some point.

                                    > Jose
                                    ______
                                    Dennis
                                  • dmccunney
                                    ... There may be other length limits you can t forget about. If the intent is copy and paste, for example, you will have a limit imposed by the size of the
                                    Message 17 of 22 , Jun 23, 2008
                                    • 0 Attachment
                                      On Mon, Jun 23, 2008 at 9:44 AM, fjmancho <fjmancho@...> wrote:
                                      > ...... Original Message .......
                                      > On Sun, 22 Jun 2008 16:08:17 -0400 dmccunney <dennis.mccunney@...>
                                      >
                                      >>An argument for set start marker/set end marker.
                                      >
                                      > I see your point and the advantages of marking (*overall* that you can
                                      > forget about *length limits*). I think that litte by little, I will move
                                      > to that solution.

                                      There may be other length limits you can't forget about. If the
                                      intent is copy and paste, for example, you will have a limit imposed
                                      by the size of the clipboard buffer.

                                      > I say little by little because now I am using around 13 scripts for taging
                                      > text. They are very simple and they work with previously highlighted
                                      > blocks. These are some examples:
                                      >
                                      > Mainly: Get the text, paste first tag (it deletes highlited text), paste
                                      > text, paste second tag
                                      > {FrmtH1::/Kq/I@@<h1>@@ /KP/I@@</h1>@@}
                                      >
                                      > Or in this way:
                                      >
                                      > {FrmtinV::/K <!--/xn/KQ/xn-->/KP}

                                      OK.

                                      > Marking the block with a marker implies modifying these scripts into
                                      > getting them to look for the marker and put the tag (if I am not
                                      > misunderstanding). I think that is doable and the benefit is *no limits*,
                                      > and maybe others.

                                      Correct. The other scripts have to know about the block. It sounds
                                      like the highlighting problem John was trying to solve for you marks
                                      the block in a manner other pEditTool actions will see. The next
                                      question is what that is. The *visual* highlighting, as mentioned, is
                                      an operator convenience. pEditTool will look at something else. The
                                      question is what that is, and how it can be expanded beyond 255 chars.

                                      >>>>Just what do you need to *do* with the highlighted block?
                                      >
                                      > Other things I do are (all of them pEditTool actions):
                                      >
                                      > Most of the times I control the number of words for some texts.
                                      > A good number of times I need to sort lines or columns
                                      > Sometimes I need to insert some characters at the begining of some lines

                                      And I assume all of these have pscripts associated with them.

                                      >>Sound like you might want to get it at some point.
                                      >
                                      > Not now

                                      Your call.

                                      > Jose
                                      ______
                                      Dennis
                                    • fjmancho
                                      ...... Original Message ....... On Sun, 22 Jun 2008 16:08:17 -0400 dmccunney ... I see your point and the advantages of marking
                                      Message 18 of 22 , Jun 23, 2008
                                      • 0 Attachment
                                        ...... Original Message .......
                                        On Sun, 22 Jun 2008 16:08:17 -0400 dmccunney <dennis.mccunney@...>



                                        >
                                        >An argument for set start marker/set end marker.
                                        >

                                        I see your point and the advantages of marking (*overall* that you can
                                        forget about *length limits*). I think that litte by little, I will move
                                        to that solution.

                                        I say little by little because now I am using around 13 scripts for taging
                                        text. They are very simple and they work with previously highlighted
                                        blocks. These are some examples:

                                        Mainly: Get the text, paste first tag (it deletes highlited text), paste
                                        text, paste second tag
                                        {FrmtH1::/Kq/I@@<h1>@@ /KP/I@@</h1>@@}

                                        Or in this way:

                                        {FrmtinV::/K <!--/xn/KQ/xn-->/KP}


                                        Marking the block with a marker implies modifying these scripts into
                                        getting them to look for the marker and put the tag (if I am not
                                        misunderstanding). I think that is doable and the benefit is *no limits*,
                                        and maybe others.



                                        >>>Just what do you need to *do* with the highlighted block?
                                        >>
                                        Other things I do are (all of them pEditTool actions):

                                        Most of the times I control the number of words for some texts.


                                        A good number of times I need to sort lines or columns

                                        Sometimes I need to insert some characters at the begining of some lines


                                        >
                                        >Sound like you might want to get it at some point.
                                        >

                                        Not now

                                        >______
                                        >Dennis
                                        >

                                        Jose
                                      • John Markley
                                        ... the pToolSet and peditPro limits are 32K. ... Work is under way to expand it *a lot*. :) ~ John
                                        Message 19 of 22 , Jun 23, 2008
                                        • 0 Attachment
                                          Quoting dmccunney <dennis.mccunney@...>:


                                          >
                                          > There may be other length limits you can't forget about. If the
                                          > intent is copy and paste, for example, you will have a limit imposed
                                          > by the size of the clipboard buffer.

                                          the pToolSet and peditPro limits are 32K.

                                          >
                                          > Correct. The other scripts have to know about the block. It sounds
                                          > like the highlighting problem John was trying to solve for you marks
                                          > the block in a manner other pEditTool actions will see. The next
                                          > question is what that is. The *visual* highlighting, as mentioned, is
                                          > an operator convenience. pEditTool will look at something else. The
                                          > question is what that is, and how it can be expanded beyond 255 chars.


                                          Work is under way to expand it *a lot*. :)

                                          ~ John
                                        • John Markley
                                          ... Clarification - As noted, the pToolSet and peditPro copy/cut/paste functions are already 32K. The 255 limit is in the character capacity of the Find
                                          Message 20 of 22 , Jun 23, 2008
                                          • 0 Attachment
                                            Quoting John Markley <jmmjr@...>:

                                            > Quoting dmccunney <dennis.mccunney@...>:

                                            >>
                                            >> Correct. The other scripts have to know about the block. It sounds
                                            >> like the highlighting problem John was trying to solve for you marks
                                            >> the block in a manner other pEditTool actions will see. The next
                                            >> question is what that is. The *visual* highlighting, as mentioned, is
                                            >> an operator convenience. pEditTool will look at something else. The
                                            >> question is what that is, and how it can be expanded beyond 255 chars.
                                            >
                                            >
                                            > Work is under way to expand it *a lot*. :)
                                            >
                                            > ~ John

                                            Clarification - As noted, the pToolSet and peditPro copy/cut/paste
                                            functions are already 32K. The 255 limit is in the character capacity
                                            of the Find line in pSearchTool. That limits the function of the
                                            HIGHLIGHT pScript I posted. But, it appears that may be able to be
                                            changed.

                                            ~ John
                                          • fjmancho
                                            ...... Original Message ....... On Mon, 23 Jun 2008 09:09:45 -0400 dmccunney ... I have just tested John s pScript. Works fine in
                                            Message 21 of 22 , Jun 23, 2008
                                            • 0 Attachment
                                              ...... Original Message .......
                                              On Mon, 23 Jun 2008 09:09:45 -0400 dmccunney <dennis.mccunney@...>
                                              wrote:

                                              >the highlighting problem John was trying to solve for you [...]


                                              I have just tested John's pScript. Works fine in my T3 (nevertheless the
                                              255 char limit is still there).

                                              I have adapeted John's version to my taste (Nothing new). In order to
                                              complete the information I post the two pScripts needed in this
                                              highlighting operation. First marks the begining of the block second the
                                              end and actually highlights the text (up to 255 characters now).


                                              {COPYS::
                                              /&ifAbort@[$^==0]
                                              /!/$c/&varSet@[$4,$$]
                                              /&mess [@@MARKED@@,,040]}

                                              {HIGHLIGHT::/GZ
                                              /&ifAbort@[$^==0]
                                              /!/$c
                                              /&varSet@[$5,$$]
                                              /&varAdd@[$5,-$4]
                                              /&varSubStr@[$B,$^,$4,$5]
                                              /&script$[@@highlight0@@]}
                                              {highlight0::
                                              /&specAct[8]
                                              /&script$[@@highlight1@@]}
                                              {highlight1::
                                              /K4cB /!/KP
                                              /&script$[@@highlight2@@]}
                                              {highlight2::
                                              /xEpst f
                                              /xEpst d
                                              /xz}



                                              Thanks, Dennis and John, for your help.

                                              Jose
                                            • fjmancho
                                              ... forget about *length limits*). I think that litte by little, I will move to that solution. Following Dennis suggestions, I have been trying some pScripts
                                              Message 22 of 22 , Jul 21 6:09 AM
                                              • 0 Attachment
                                                >>An argument for set start marker/set end marker.
                                                >

                                                >I see your point and the advantages of marking (*overall* that you can
                                                forget about *length limits*). I think that litte by little, I will move
                                                to that solution.



                                                Following Dennis' suggestions, I have been trying some pScripts on this
                                                issue of marking (mainly big text blocks). I came up wiht some pScripts
                                                which I am posting in a new thread.

                                                DOUBLE PUNCTUATION MARKS AND OTHERS


                                                Jose
                                              Your message has been successfully submitted and would be delivered to recipients shortly.