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

Re: [peditors] removing stuff between '<' and '>' ?

Expand Messages
  • Voytek Eymont
    ... John, ahem, dumb operator s dumb error.... I can t recall (or figure out...) where/how to put the script, save/name it, and invoke it... I m going over the
    Message 1 of 12 , Jun 29, 2011
    • 0 Attachment
      On Wed, June 29, 2011 11:11 pm, John Markley wrote:

      > Here is a shorter and much more elegant way to get the same result.
      > I think it is better than the first one. It will only run in an
      > active text field. It will run in a text field that does not have both <
      > and > bracketing some text but will not do anything to the text at all.
      > When <text> is present it will remove it.

      John,

      ahem, dumb operator's dumb error....

      I can't recall (or figure out...) where/how to put the script, save/name
      it, and invoke it...

      I'm going over the old notes you sent me last time, but haven't found it yet.



      --
      Voytek
    • John Markley
      ... I ve modified a tutorial I did a long time ago for your project. Read and do the whole thing below and you ll be up and running. ********** pScripting
      Message 2 of 12 , Jun 29, 2011
      • 0 Attachment
        Quoting Voytek Eymont <voytek@...>:
        > John,
        >
        > ahem, dumb operator's dumb error....
        >
        > I can't recall (or figure out...) where/how to put the script, save/name
        > it, and invoke it...
        >
        > I'm going over the old notes you sent me last time, but haven't found it yet.

        I've modified a tutorial I did a long time ago for your project. Read
        and do the whole thing below and you'll be up and running.

        **********

        pScripting tutorial:

        Since I am frequently helping others use pScripting for Palm OS,
        I've written this intro tutorial to avoid repetition of effort. I
        have no commercial connection whatever with the pToolSet and pedit
        family of apps, but rather am myself a long-time happy user of them
        (and a beta tester), grateful to their developer, Paul Nevai, for
        their power, utility, and high quality.

        pToolSet is a suite of 29 .prc's, a few of which will appear as
        apps in your launcher, but most of which run invisibly as background
        extensions until called upon. These have a multitude of utility
        functions such as full-featured text editing of any Palm text field,
        making entries into calendar, memo, and task DBs while still in other
        apps, and text searches, and much more. In addition pToolSet enables
        the use of macro scripts, called pScripts, which will automate nearly
        any sequence of actions normally performed manually with keystrokes,
        button presses, and stylus. Full use can be made of all the utility
        functions of pToolSet without ever using pScripts. pScripting can be
        used to automate and facilitate use of the Palm device without using
        any of the other pToolSet modules. pToolSet and the pScripting
        computer language were written by Paul Nevai, a professor of
        mathematics at Ohio State University.

        To evaluate pToolSet go to

        http://home.columbus.rr.com/nevai/palm/

        and click in the left column on the pToolSet link under the pToolSet
        heading, and also download the html manual listed under ptoolSet
        documentation. To make full use of pScripting, also download the html
        manual under pedit documentation, and the pScriptRunner link under the
        pToolSet heading.

        There are 29 .prc's in the pToolSet folder. Install them all, as
        they are interactive and needed for full function. Do not install the
        contents of the 00pToolButtons subfolder. Once installed pToolSet
        should automatically be on and running, but to be sure, look in your
        launcher and tap/select the "pToolOn" app. The functions of all the
        pToolSet modules are fully described in the pToolSet manual. The
        reason for downloading the pedit manual is that it contains the full
        manual for the pScripting language, which was initially written by
        Paul Nevai for the pedit text editor apps, but which has been extended
        to operate via pToolSet globally, without the need to have one of the
        pedit test editor family e.g. peditPro.

        The master control, in essence a launcher, for pToolSet is
        pMasterTool. When launched it appears as a single column list of all
        the pToolSet modules and a number of actions. It can be launched in a
        variety of ways detailed in the manual, including screen taps, button
        press-and-holds, and key presses. However, to start, the easiest way
        is to open the command bar (stylus forward upward slash stroke) and
        tap the P-house icon which will be present if pToolSet is on. If you
        have a Treo the command bar can be displayed using a feature of Butler
        or 2LaunchMe. If you have a Treo but no way to display the command
        bar, proceed as in the next paragraph, taken from the manual.
        Otherwise skip to the paragraph after next.

        You can activate pMasterTool as an Operating System Extension,
        which is the launcher for pToolSet modules and special actions, using
        a screen tap, a hard button press and hold, or the ESC key mechanism,
        as follows. Launch the pToolPrefs application which will have appeared
        in your launcher after installing pToolSet. Check on the "buttons" and
        "taps" check boxes. Select the "Taps" button. Select the long box
        under "pick tap pattern:" and select "BOTTOM border of DisplayScreen".
        Select the box next to "LAST FOURTH" and select "current pMasterT".
        Select OK and OK. Now a screen tap in the right fourth of the screen
        bottom edge will launch pMasterTool as the extension. Another
        practical choice is the "LAST FOURTH" of the "RIGHT border of
        DisplayScreen". ?Similarly, using the "Buttons" button in pToolPrefs
        you can designate a press-and-hold of one of the hard buttons to
        activate pMasterTool. Or, to use the ESC key mechanism, launch
        pToolPrefs and check on the "use ESC key" box. Put an infrequently
        used lower case letter such as "z", or one of the opt button
        characters such as "+" in the highlighted space. When you press the
        letter key once, or press opt plus key simultaneously, pMasterTool
        will launch. To type the character press the letter key a second time,
        or press opt and character in sequence rather than simultaneously.

        You can have more than one method to display the pMasterTool list
        (henceforth "PMT") set up. You can also configure the PMT list in
        different orders, and can configure it to use lower-case key presses
        to activate the modules for Treo friendliness (see the manual or ask
        me or the pedit forum). If your interest is in using the pToolSet
        modules, the tutorial is done. Just open PMT and activate a module
        and experiment, read the manual(carefully, it is very
        information-dense), visit the forum. Explore the PMT dropdown menus
        obtained by tap/press on menu, or tap on the header bar, while the PMT
        list is open. If you want to do pScripting, read on.

        Usually if you are reading this far it is because I'm helping you
        with a specific pScripting project goal such as automating a sequence
        for use in some app such as DateBk. The following will take you up to
        the point where we will do the specific pScript you need.
        1) Open PMT. Select pScriptPad. This will open a memo-pad-like
        text field with the header scriptPad-#1. This pad, and only this one,
        is recognized by the pScripting engines of pToolSet to contain the
        code which constitutes pScripts.
        2) First we'll set it up so you can use pScriptButtons, and several
        other methods, to launch pScripts. 2 or 3 lines down from the top of
        pScriptPad write

        custBtnPageTotal=1

        Everything you write in pScriptPad must be exact, as it is computer
        code and taken literally. For example, there are no spaces in
        "custBtnPageTotal=1".

        2 or 3 lines below custBtnPageTotal=1 write

        custBtn.001.1
        pScript_01

        Now Voytek, put the {remove < >:: pScript here, so your pScript pad
        should now look like

        custBtnPageTotal=1

        custBtn.001.1
        pScript_01
        {remove < >::
        /&ifAbort@[$^==0]
        /&script$[@@rem< >2@@]}
        {rem< >2::
        /&specAct[8] <
        /xEpst I
        /xEpst S
        /xEpst W
        /xEpst f
        /xEpst d
        /0x1C
        /&script$[@@rem< >3@@]}
        {rem< >3::
        /!/$c/&varSet@[$4,$$]
        /&script$[@@rem< >4@@]}
        {rem< >4::
        /&specAct[8] >
        /xEpst f
        /xEpst d
        /0x1D
        /&script$[@@rem< >5@@]}
        {rem< >5::
        /!/$c
        /&varSet@[$5,$$]
        /&varAdd@[$5,-$4]
        /&varSubStr@[$B,$^,$4,$5]
        /&clipAdd i[$B]
        /&script$[@@rem< >6@@]}
        {rem< >6::
        /&specAct[8]
        /&script$[@@rem< >7@@]}
        {rem< >7::
        /ep
        /xEpst f
        /xEpst d
        /0x08
        /&mess[@@DONE@@,,150]}


        Tap OK to leave pScriptPad

        Open a text field that has a test text to try out the remove< > script
        on, something like

        xxxxxxxxx <abcdabcd > zzzzzzzz, with the cursor flashing anywhere in
        the field.

        Open the pMasterTool list as you learned to do above and select
        pScriptButtons (Buttons, not Pad).

        Tap the button that says "remove < >".

        Voila.
        ~ John
      • John Markley
        ... Voytek - Here s a short explanation for why you need to do the long item I sent you (not as long as it looks to do though). To run a pScript you need to
        Message 3 of 12 , Jun 29, 2011
        • 0 Attachment
          Quoting John Markley <jmmjr@...>:

          > I've modified a tutorial I did a long time ago for your project. Read
          > and do the whole thing below and you'll be up and running.

          Voytek -

          Here's a short explanation for why you need to do the long item I
          sent you (not as long as it looks to do though).

          To run a pScript you need to have it in pScriptPad, properly, and
          you need to use one of several methods available to launch it. For
          starters the pToolSet module called pScriptButtons I think is best for
          launching. In order to use pScriptPad and pScriptButtons (and all the
          other pToolSet tools) you need to be able to open pMasterTool, which
          is a scrollable list of the modules from which you can launch them.
          So, you need to

          install pToolSet
          open pMasterTool to open pScriptPad
          put the pScript in the pScriptPad in a certain way to be able to use
          pScriptButtons
          make a test text to run the pScript on
          use pMasterTool to open pScriptButtons and run the "remove < >" pScript

          The tutorial explains how to do all this.

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