Re: getting rid of multiple consecutive blanks ?

John Markley <[email protected]> Mon, 09 Nov 2009 13:29:08 -0500
Newsgroups gmane.comp.handhelds.palm.peditors
Message-ID <[email protected]>
Quoting John Markley <[email protected]>:

> Again, each pScript in a chain is a complete pScript on its own, and
> it doesn't matter what order they appear.  The command
> "/&script$[@@xxx@@]}" says, as the final action of this pScript, go
> find the pScript named xxx and run it.  It doesn't matter where in the
> pad the pScript named xxx resides.  The code Paul wrote into pedit and
> pToolSet to run pScripts goes to the very start of the pad and scans
> down until it finds {xxx:  and runs it.

   I think I should provide a little more explanation since you are  
new to pScripting.  What I have been sending you are moderately  
complex chains of pScripts.  Unless you have read the pScripting  
sections of the pedit manual (you should) it may not at all be clear  
why a chain is needed.  Why not start with a pScript name, say  
{SPdelete::, then put in all the pTokens and pExpressions in order,  
and end it with the closing } bracket?  The answer is twofold - one,  
there is a limit to the amount of info that the Palm OS will process  
in one pScript chunk (the 55-byte limit), and two, there is a  
hierarchical order in which the OS processes the pScript commands  
which does not necessarily follow the order that you want them to be  
processed in.  The only way to deal with these two limits is to  
accomplish the overall task which the pScripts automate by linking  
sequential pScripts together in a chain.  So, when pScript "A" has  
done all it can (often determined by trial-and-error), you write in a  
final instruction to now run pScript "B", and carry on the task.  This  
looks like

{A::
/blah blah blah
/&script$[@@B@@]}

It does not matter where in your pScriptPad A and B are, separated or  
not, nor in what order.  The command "/&script$[@@B@@]}" says to go  
find and run B wherever it is.

     ~ 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/