Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ VBscript
➜ Reading Output from World
|
Reading Output from World
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| JonG
(1 post) Bio
|
| Date
| Sun 22 Jul 2001 02:47 PM (UTC) |
| Message
| 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 | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Mon 23 Jul 2001 12:12 AM (UTC) |
| Message
| 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".
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,931 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top