Re: removing stuff between '<' and '>' ?
John Markley <[email protected]> Wed, 29 Jun 2011 18:29:37 -0400
| Newsgroups | gmane.comp.handhelds.palm.peditors |
|---|---|
| Message-ID | <[email protected]> |
Quoting Voytek Eymont <[email protected]>: > 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 ------------------------------------ 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-hHKSG33Tihh4sT85+ipIM4ckdKdSAMto@public.gmane.org! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/peditors/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/peditors/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/