Hello Thomas,

   On Fri, 7 Nov 2003 22:32:23 +0100 (08.11.2003 02:32 my local time)
   you wrote about "[MyMacros] Syntax problem in %For"
   at least in part:

TW> I think it's a syntax problem in the %for loop. Can someone take a
TW> look?
Well, I suppose, For can (and really) work. I grab example from Andrey's
page and tested "for" with you message
> ----
> %_Ncb="%OTEXT"%-
> %For("1","%CountLines('%_Ncb')","Ncbc",%-
> "%%TextBar(' ','%%_Ncbc','','4')   %-
> %%GetLine('%%_Ncbc','%%_Ncb')
> ")----
produced (sorry for full long output) such correct results
----
   1   Hello
   2   
   3   I'm searching for a workaround for my "special leading spaces problem"
   4   and I tested the MyMacro 1.07 plugin with following syntax:
   5   
   6   %_lnCount="%CountLines('%TEXT')"%-
   7   %For("1","%_lnCount","forCount","%TRIM(`%GetLine('%%_forCount','%TEXT')`)")%-
   8   
   9   The result is always " ".
  10   
  11   I think it's a syntax problem in the %for loop. Can someone take a
  12   look?
  13   
  14   -- 
  15   Thomas.
  16   
  17   
  18   
  19   
  20   
  21   ________________________________________________________
  22   
  23   http://www.silverstones.com/thebat/TBUDLInfo.html
  24   
----
I think, you doesn't grok meaning of %Eval macro, which used
(internally) for processing last parameter of For macro

Anyway, my modification works as requested :-)
----->8-------------------------------------- from WinClipboard
%_Src="%OTEXT"%-
%_lnCount=%CountLines('%_Src')%-
%For("1","%_lnCount","forCount","%%Trim([%%GetLine('%%_forCount','%%_Src')])%%Chr('13')%%Chr('10')")
----->8--------------------------------------------------------

-- 
Best regards,
 Alexander Leschinsky

- MOTD:
Aristotle was famous for knowing everything. He taught that the brain exists merely to 
cool the blood and is not involved in the process of thinking. This is true only of 
certain persons.
Will Cuppy



________________________________________________________

http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to