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

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

Expand Messages
  • John Markley
    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
      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.

      /*Abort if not text field*/
      {cut<>0::/*Abort if no >*/
      /&specAct[8] >
      /xEpst f
      /&ifScript@Bf[$$==6742,@@no >@@]
      {no >::
      /&mess[@@no >@@]
      /xEpst .
      /xEpet o}
      /xEpet d
      /xEpet o
      /&specAct[8] <
      /xEpst f
      /xEpst d
      /&ifScript@Bf[$$==6742,@@no <@@]
      /&varSet@ [$1,$$]
      {no <::
      /&mess[@@no <@@]
      /xEpst . }

      regards, John
    • Show all 12 messages in this topic