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

30646Possible useful text-editing pScript

Expand Messages
  • John Markley
    Jan 1, 2008
    • 0 Attachment
      Greetings and best wishes for 2008 to all. For quite some time I have been irritated by
      the occasional mangling of a string of text by unplanned mishaps whilst said string is in
      the highlighted state preparatory to some manipulation. A lowlight event you might say.
      Contemplating oncoming life without (much) stylus has put further focus on this. Paul has
      put a very nice feature in peditPro, using the "Set Marker" (ESC @) command plus the
      "Marker" button in the pedit symmetric selector, which allows to select any arbitrary string
      of text without running a stylus over it. But this feature is limited to pedit and is not
      avaiable in pEditTool Select, which is limited to prescribed chunks of text e.g. current
      lines, current words, etc. As far as I know there are no apps for Palm OS which will select
      arbitrarily delimited text strings, although there are some others which will select similarly
      to pEditTool Select. So I've made one with a pair of pScripts. It (they) has the additional
      advantage that the text is never actually highlighted and consequently cannot be deranged
      in process.
      The pScript pair is presented below in hopes some of you may find it useful. You put the
      cursor at the start of the text you wish to copy, and activate {COPY START. A gratifying
      message will be seen denoting success. :)
      You then put the cursor at the end of the string to be copied and activate {COPY FINISH,
      another message results, and the string now resides in the clipboard to be pasted
      wherever desired. If either is activated in any circumstance other than a text field with an
      active cursor, nothing whatever will happen.


      {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]}

      cheers, John
    • Show all 13 messages in this topic