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
➜ General
➜ Capturing a string of text
Capturing a string of text
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| James Paull
Malaysia (5 posts) Bio
|
Date
| Fri 13 Sep 2002 11:12 PM (UTC) |
Message
| I have read the posts that deal with this, but I can’t get it to work. Here is what I have, I look forward to any help.
Some of my script file:
sub logon
world.closelog
world.openlog "C:\Program Files\MUSHclient\worlds\capture.txt", false
world.send "info here"
world.send "listen"
end sub
sub logoff
World.closelog
world.openlog "C:\Program Files\MUSHclient\worlds\avalon.txt", true
end sub
I have a trigger that should execute “sub logoff” when the response for “listen” comes back but it doesn’t work. It does work when I type in “listen”. I can work with any text I can assign to a variable or a file but how do I do get that far?
Thanks for any help.
James | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 14 Sep 2002 12:27 AM (UTC) |
Message
| Can you copy and paste the trigger here? Sounds funny that it works when you type "listen" but not when the trigger fires. Are you sure you don't have an alias instead? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| James Paull
Malaysia (5 posts) Bio
|
Date
| Reply #2 on Sat 14 Sep 2002 02:42 AM (UTC) |
Message
| I have no alias', my trigger is as follows:
^You tilt your head and listen intently\.$
any any grey grey grey
all blank but enabled and regular and script logoff
rest default.
thanks,
James | Top |
|
Posted by
| James Paull
Malaysia (5 posts) Bio
|
Date
| Reply #3 on Sat 14 Sep 2002 08:49 AM (UTC) |
Message
| Sorry forget my post I guess I figured it out. I had to change my script to read Sub logoff(thename, theoutput, thewildcards) though I don't understand why. Thank you though.
later,
James | Top |
|
Posted by
| Magnum
Canada (580 posts) Bio
|
Date
| Reply #4 on Sat 14 Sep 2002 03:37 PM (UTC) Amended on Sat 14 Sep 2002 03:42 PM (UTC) by Magnum
|
Message
| TheName - The name of the Trigger/Alias that called this script.
TheOutput - The entire line that caused the trigger to fire, or the entire alias line you entered.
TheWildcards - An array consisting of all the wildcards captured with the trigger or alias.
MUSHclient will try and send those values to your scripted subroutine. An error occurs if your subroutine is not written to accept three arguments. |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | Top |
|
Posted by
| James Paull
Malaysia (5 posts) Bio
|
Date
| Reply #5 on Sun 15 Sep 2002 04:47 AM (UTC) |
Message
| Thanks for the description Magnum, it makes sense.
James | 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.
18,562 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top