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

removing stuff between '<' and '>' ?

Expand Messages
  • Voytek Eymont
    yadq dumb question... need help [he means: can someone do it for him?] with getting a script to remove all stuff between reason I use Hours (from
    Message 1 of 12 , Jun 26, 2011
    • 0 Attachment
      yadq
      dumb question...

      need help [he means: can someone do it for him?] with getting a script to
      remove all stuff between '<' and '>'

      reason
      I use 'Hours' (from sf.net) to keep track of stuff, stuff gets imported
      from calendar/datebk

      stuff contains 'un-required DateBk stuff' between '<''>'

      in the past, there was only 2 lines and a bit, so I did it by hand
      now, there is a lot more stuff between '<' '>', like 7 lines or more



      --
      Voytek

      (I like my Android Motrix phone, but, there plenty of life left in Palm
      and EVEN MORE SO, in Palm APPS, from where I am at)
    • John Markley
      ... Voytek - I ve gone over to Android, partly for practical reasons and partly for the challenge of learning new stuff, and so have not done any pScripting
      Message 2 of 12 , Jun 26, 2011
      • 0 Attachment
        Quoting Voytek Eymont <voytek@...>:

        > yadq
        > dumb question...
        >
        > need help [he means: can someone do it for him?] with getting a script to
        > remove all stuff between '<' and '>'
        >
        > reason
        > I use 'Hours' (from sf.net) to keep track of stuff, stuff gets imported
        > from calendar/datebk
        >
        > stuff contains 'un-required DateBk stuff' between '<''>'
        >
        > in the past, there was only 2 lines and a bit, so I did it by hand
        > now, there is a lot more stuff between '<' '>', like 7 lines or more

        Voytek -

        I've gone over to Android, partly for practical reasons and partly
        for the challenge of learning new stuff, and so have not done any
        pScripting for over a year. However I still have my Treo, and after a
        little brushing up I may be able to deliver, but it'll be a while. If
        anyone else reads this who is on top of it now, please go ahead.
        ~ John
      • John Markley
        ... Voytek - In pedit only, or in other text fields. Do you use pedit alone, or pToolSet? ~ John
        Message 3 of 12 , Jun 27, 2011
        • 0 Attachment
          Quoting Voytek Eymont <voytek@...>:

          > yadq
          > dumb question...
          >
          > need help [he means: can someone do it for him?] with getting a script to
          > remove all stuff between '<' and '>'

          Voytek -

          In pedit only, or in other text fields. Do you use pedit alone, or
          pToolSet?
          ~ John
        • Voytek Eymont
          ... John, pToolSet the data is in a text field in Hours thanks -- Voytek
          Message 4 of 12 , Jun 28, 2011
          • 0 Attachment
            On Tue, June 28, 2011 11:24 am, John Markley wrote:
            > Quoting Voytek Eymont <voytek@...>:

            > In pedit only, or in other text fields. Do you use pedit alone, or
            > pToolSet?

            John,

            pToolSet

            the data is in a text field in 'Hours'

            thanks

            --
            Voytek
          • John Markley
            ... OK Voytek, here it is. There are several ways of accomplishing this, and this very long pScript chain is I think one of the easiest. It will work in any
            Message 5 of 12 , Jun 28, 2011
            • 0 Attachment
              Quoting Voytek Eymont <voytek@...>:
              >
              > pToolSet
              >
              > the data is in a text field in 'Hours'
              >
              > thanks
              >
              > --
              > Voytek

              OK Voytek, here it is. There are several ways of accomplishing
              this, and this very long pScript chain is I think one of the easiest.
              It will work in any normal text field as long as you have pToolSet on,
              and you have the text cursor flashing anywhere in the field, i.e. it
              is an active text field.
              Less than half of the total chain does the removal of <blah blah>
              as you requested. The rest of it is safeguards to prevent undesired
              consequences. If you run it on some field or app that is not an
              active text field it will do nothing. If you run it on a text field
              that has "<", but no ">", or vice versa, or neither of them it will
              also do nothing. It will only run when there is a < and a >. This is
              important since it eats up < and > and everything between, and if it
              worked if only one or other were there it would eat the whole text
              field.!
              Since it is so long I suggest you copy and paste it into pScriptPad
              rather than try to transcribe it by hand. Hope this is what you need,
              let me know.

              {cut<>::
              /*Abort if not text field*/
              /&specAct[5]
              /&varSet@[$2,$^]
              /&ifAbort@[$2==0]
              /&script$[@@cut<>0@@]}
              {cut<>0::/*Abort if no >*/
              /&specAct[8] >
              /xEpst f
              /&script$[@@no>1@@]}
              {no>1::
              /!/$f
              /&ifScript@Bf[$$==6742,@@no >@@]
              /&script$[@@cut<>1@@]}
              {no >::
              /&mess[@@no >@@]
              /xEpst .
              /xEpet o}
              {cut<>1::
              /&mess[@@ok@@]
              /xEpet d
              /xEpet o
              /0x1D
              /&script$[@@cut<>1B@@]}
              {cut<>1B::
              /&specAct[8] <
              /xEpst f
              /xEpst d
              /&script$[@@cut<>1C@@]}
              {cut<>1C::
              /!/$f
              /&ifScript@Bf[$$==6742,@@no <@@]
              /&script$[@@cut<>2@@]}
              {cut<>2::
              /0x08
              /e@
              /&varSet@ [$1,$$]
              /&ifScript@Bf[$1!=62,@@cut<>3@@]
              /&ifScript@Bf[$1==62,@@cut<>4@@]}
              {cut<>3::
              /0x1D
              /0x08
              /&script$[@@cut<>2@@]}
              {cut<>4::
              /0x1D
              /0x08
              /&mess[@@DONE@@]}
              {no <::
              /&mess[@@no <@@]
              /xEpst . }

              regards, John
            • John Markley
              ... OK Voytek, here it is. There are several ways of accomplishing this, and this very long pScript chain is I think one of the easiest. It will work in any
              Message 6 of 12 , Jun 28, 2011
              • 0 Attachment
                Quoting Voytek Eymont <voytek@...>:
                >
                > pToolSet
                >
                > the data is in a text field in 'Hours'
                >
                > thanks
                >
                > --
                > Voytek

                OK Voytek, here it is. There are several ways of accomplishing
                this, and this very long pScript chain is I think one of the easiest.
                It will work in any normal text field as long as you have pToolSet on,
                and you have the text cursor flashing anywhere in the field, i.e. it
                is an active text field.
                Less than half of the total chain does the removal of <blah blah>
                as you requested. The rest of it is safeguards to prevent undesired
                consequences. If you run it on some field or app that is not an
                active text field it will do nothing. If you run it on a text field
                that has "<", but no ">", or vice versa, or neither of them it will
                also do nothing. It will only run when there is a < and a >. This is
                important since it eats up < and > and everything between, and if it
                worked if only one or other were there it would eat the whole text
                field.!
                Since it is so long I suggest you copy and paste it into pScriptPad
                rather than try to transcribe it by hand. Hope this is what you need,
                let me know.

                {cut<>::
                /*Abort if not text field*/
                /&specAct[5]
                /&varSet@[$2,$^]
                /&ifAbort@[$2==0]
                /&script$[@@cut<>0@@]}
                {cut<>0::/*Abort if no >*/
                /&specAct[8] >
                /xEpst f
                /&script$[@@no>1@@]}
                {no>1::
                /!/$f
                /&ifScript@Bf[$$==6742,@@no >@@]
                /&script$[@@cut<>1@@]}
                {no >::
                /&mess[@@no >@@]
                /xEpst .
                /xEpet o}
                {cut<>1::
                /&mess[@@ok@@]
                /xEpet d
                /xEpet o
                /0x1D
                /&script$[@@cut<>1B@@]}
                {cut<>1B::
                /&specAct[8] <
                /xEpst f
                /xEpst d
                /&script$[@@cut<>1C@@]}
                {cut<>1C::
                /!/$f
                /&ifScript@Bf[$$==6742,@@no <@@]
                /&script$[@@cut<>2@@]}
                {cut<>2::
                /0x08
                /e@
                /&varSet@ [$1,$$]
                /&ifScript@Bf[$1!=62,@@cut<>3@@]
                /&ifScript@Bf[$1==62,@@cut<>4@@]}
                {cut<>3::
                /0x1D
                /0x08
                /&script$[@@cut<>2@@]}
                {cut<>4::
                /0x1D
                /0x08
                /&mess[@@DONE@@]}
                {no <::
                /&mess[@@no <@@]
                /xEpst . }

                regards, John
              • Voytek Eymont
                Many thanks I ll try later today and let you know. Learning Swype on Motrix But still have problems with editing quoted text Thanks again ... Voytek ... Sent
                Message 7 of 12 , Jun 28, 2011
                • 0 Attachment
                  Many thanks

                  I'll try later today and let you know.

                  Learning Swype on Motrix
                  But still have problems with editing quoted text
                  Thanks again

                  John Markley <jmmjr@...> wrote:

                  >Quoting Voytek Eymont <voytek@...>:
                  >>
                  >> pToolSet
                  >>
                  >> the data is in a text field in 'Hours'
                  >>
                  >> thanks
                  >>
                  >> --
                  >> Voytek
                  >
                  > OK Voytek, here it is. There are several ways of accomplishing
                  >this, and this very long pScript chain is I think one of the easiest.
                  >
                  >It will work in any normal text field as long as you have pToolSet on,
                  >
                  >and you have the text cursor flashing anywhere in the field, i.e. it
                  >is an active text field.
                  > Less than half of the total chain does the removal of <blah blah>
                  >as you requested. The rest of it is safeguards to prevent undesired
                  >consequences. If you run it on some field or app that is not an
                  >active text field it will do nothing. If you run it on a text field
                  >that has "<", but no ">", or vice versa, or neither of them it will
                  >also do nothing. It will only run when there is a < and a >. This is
                  >
                  >important since it eats up < and > and everything between, and if it
                  >worked if only one or other were there it would eat the whole text
                  >field.!
                  > Since it is so long I suggest you copy and paste it into pScriptPad
                  >rather than try to transcribe it by hand. Hope this is what you need,
                  >
                  >let me know.
                  >
                  >{cut<>::
                  >/*Abort if not text field*/
                  >/&specAct[5]
                  >/&varSet@[$2,$^]
                  >/&ifAbort@[$2==0]
                  >/&script$[@@cut<>0@@]}
                  >{cut<>0::/*Abort if no >*/
                  >/&specAct[8] >
                  >/xEpst f
                  >/&script$[@@no>1@@]}
                  >{no>1::
                  >/!/$f
                  >/&ifScript@Bf[$$==6742,@@no >@@]
                  >/&script$[@@cut<>1@@]}
                  >{no >::
                  >/&mess[@@no >@@]
                  >/xEpst .
                  >/xEpet o}
                  >{cut<>1::
                  >/&mess[@@ok@@]
                  >/xEpet d
                  >/xEpet o
                  >/0x1D
                  >/&script$[@@cut<>1B@@]}
                  >{cut<>1B::
                  >/&specAct[8] <
                  >/xEpst f
                  >/xEpst d
                  >/&script$[@@cut<>1C@@]}
                  >{cut<>1C::
                  >/!/$f
                  >/&ifScript@Bf[$$==6742,@@no <@@]
                  >/&script$[@@cut<>2@@]}
                  >{cut<>2::
                  >/0x08
                  >/e@
                  >/&varSet@ [$1,$$]
                  >/&ifScript@Bf[$1!=62,@@cut<>3@@]
                  >/&ifScript@Bf[$1==62,@@cut<>4@@]}
                  >{cut<>3::
                  >/0x1D
                  >/0x08
                  >/&script$[@@cut<>2@@]}
                  >{cut<>4::
                  >/0x1D
                  >/0x08
                  >/&mess[@@DONE@@]}
                  >{no <::
                  >/&mess[@@no <@@]
                  >/xEpst . }
                  >
                  > regards, John
                  >
                  >
                  >
                  >------------------------------------
                  >
                  >Latest pedit/pToolSet/LapTopHack at
                  >http://www.osuweb.net/~pc/pca/pc_all.zip
                  >pedit/pToolSet/LapTopHack scripting info/resources at
                  >http://www.peditors.com
                  >Peditors Forum http://groups.yahoo.com/group/peditors
                  >Unsubscribe by writing to peditors-unsubscribe@yahoogroups.comYahoo!
                  >Groups Links
                  >
                  >
                  >
                  Voytek

                  ---
                  Sent from my Motrix with K-9 Mail. Please excuse my brevity.
                • John Markley
                  ... OK, you re welcome. ~ John
                  Message 8 of 12 , Jun 28, 2011
                  • 0 Attachment
                    Quoting Voytek Eymont <voytek@...>:

                    > Many thanks
                    >
                    > I'll try later today and let you know.

                    OK, you're welcome.
                    ~ John
                  • John Markley
                    Voytek - 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
                    Message 9 of 12 , Jun 29, 2011
                    • 0 Attachment
                      Voytek -

                      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.

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

                      regards,
                      ~ John
                    • 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 10 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 11 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 12 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.