rejetto forum

macros - filesize

Guest · 3 · 2236

0 Members and 1 Guest are viewing this topic.

Warp

  • Guest
Hi,
another macro related question.

I wrote a text file (Test.txt).
Using a javascript interval i write the filesize to another frame every second:

parent.frames[1].document.write ('{.filesize|warp2001\test.txt.}');

So far it works.

If a manualy edit and save the text file the size changes.

But the javascript function with the macro always write the old filesize.


Maybe i don't understand the macro concept ?
Any idea or help ?



Warp


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
macros run server side, once.

when your javascript code is downloaded, the macro is ran once, the result is passed to the browser as a number.
that's why.
you can't use macros for that purpose (client side).


Warp

  • Guest
Hi,

ok, i understand.
Thank you for the answer.


Warp