Re: getting rid of multiple consecutive blanks ?
John Markley <[email protected]> Sun, 08 Nov 2009 13:11:26 -0500
| Newsgroups | gmane.comp.handhelds.palm.peditors |
|---|---|
| Message-ID | <[email protected]> |
Quoting John Markley <[email protected]>: > Quoting Voytek Eymont <[email protected]>: >> also: I'm running scripts against a different data sets, works well, though: >> >> how can we remove single leading blank space? >> >> if there are leading blank spaces, SPd get rid down to a single leading >> space. > More about this later. Put this is your pScriptPad - {LeadingSpaceDelete:: /&runtimeInit[] /0x1C /xEpro f /xEpro T/xEpro W/xEpro R/xEpro r /p10/p32 /xEpro f /&script$[@@LSD0@@]} {LSD0:: /&ifAbort@[$&==0] /&ifScript@[$&!=0,@@LSD1@@]} {LSD1:: /xEpro f /xEpro T/xEpro W/xEpro R/xEpro r /p10/p32 /&script$[@@LSD2@@]} {LSD2:: /&tap i[080,080] /&script$[@@LSD3@@]} {LSD3:: /p10 /xEpro f /&script$[@@LSD4@@]} {LSD4::A /&script$[@@LSD5@@]} {LSD5:: d} and, change the last line of SPdelete to read - {SPd6:: d /&script$[@@LeadingSpaceDelete@@]} Now when you run SPdelete it will also remove all leading spaces, *except* if there is a leading space in the very first topmost line of the memo. That one you'll need to remove manually (I could make the pScript do it but it adds a lot of complexity for one space at a known location). ~ 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/