Reading Output from World

Posted by JonG on Sun 22 Jul 2001 02:47 PM — 2 posts, 12,212 views.

#0
Just wondering (as i am new to scripting) if there is a way
to read output from the output window,like a world.ReadLine command or something(that would be nice!)

Currently I'm using the log txt file as my output source, but this is generally ineffective.

What I would like to be able to do is either

A)Have the logfile have X number of lines each time I login for a session, and only the output lines for the session, and the logfile acting like a buffer so that old lines get
trashed and new ones are placed on the stack/queue.

This is rather complex but attainable.

B)What would be simpler is to have some function that reads
line by line the output and then I can deal with said information from there.


Cheers, and thanks for any help.

Jon Gardner
Australia Forum Administrator #1
The simplest thing would be to make a trigger that matches on every line, eg. match on: *

Then that trigger can call a script that will process each line in sequence. You can make the trigger "keep evaluating" so that other triggers will still do their stuff.

That trigger would conceivably miss totally blank lines, you you might want to make a regular expression trigger:


^.*$


Then under Global Preferences -> General check "Regular expressions can match on an empty string".