|
Fidel Beginner
Joined: 07 Oct 2009 Posts: 19 Location: Poland
|
Posted: Wed Oct 07, 2009 9:08 am
Catching end of MUD response |
Hi,
In MUD which I use, after sending any command MUD responses with text + "> " chars in new line. Is it possible to catch > or some other way know when response for command is finished?
Trigger with pattern ">" does not work for single command.
For example sending "test" command, I get response
"Slucham?
> "
When sending "test;test" the response is:
Code: |
test
test
Slucham?
> Slucham?
> |
And then trigger fires in line "> Slucham?"
I also looked for some Event on this, but according to documentation there is no such one.
Thanks for your response
Pawel |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Oct 07, 2009 3:12 pm |
It sounds like you want a #TRIGGER with the prompt option checked.
Something like this should help you out.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger name="Prompt" priority="1130" newline="false" prompt="true" copy="yes">
<pattern>^></pattern>
<value>#RAISEEVENT onPrompt; #ECHO Prompt Fired</value>
</trigger>
</cmud>
This trigger looks for '>' at the start of a line and that's waiting for input. It echoes text to let you know the prompt was matched. It also raises an Event that let's you know you received your prompt. But that's just me trying to be fancy, and it's not necessary. |
|
_________________ Asati di tempari! |
|
|
|
Fidel Beginner
Joined: 07 Oct 2009 Posts: 19 Location: Poland
|
Posted: Wed Oct 07, 2009 7:44 pm |
It works.
Thanks
Pawel |
|
|
|
|
|