Register forum user name Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ General ➜ need some help - logging triggered text

need some help - logging triggered text

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Guest1   USA  (256 posts)
Date Wed 18 Sep 2002 09:04 PM (UTC)
Message
ok this is what I want to do:

I have an 'afk' mode on/off alias/trigger set so that if I go afk and someone tells me something, they are given an automatic response that I am afk. That part is no worries.

What I am also wanting to do is have whatever someone tells me while I'm afk to be saved to a notepad txt file.

I have 2 triggers now that both match on

* tells you *

one of the triggers (labelled afktrigger) just sends to world

tell %1 <auto reply> I am currently afk.

no worries there. the second trigger (labelled afklog) I have set to send to notepad (append) this:

%1 tells you %2

but there isn't any notepad .txt files being created ("If you are appending to a notepad window, the trigger text is appended to a window of the name: "Trigger: <label>" where <label> is the label of this trigger. If there is no label, then the window name will be just "Trigger:". If this window does not exist, it is created.")

What am I doing wrong here, can someone help please? I've searched C drive to make sure it wasn't hiding out somewhere.. no luck there.
Top

Posted by Guest1   USA  (256 posts)
Date Reply #1 on Wed 18 Sep 2002 09:19 PM (UTC)
Message
possibly an easier way would be to just have the one trigger that sends a tell to the world and calls a subroutine at the same time, and have the subroutine write to the txt file, but having problems there trying to figure out how to do it.. I presume using the World.writelog "message" in it?
Top

Posted by Guest1   USA  (256 posts)
Date Reply #2 on Wed 18 Sep 2002 09:40 PM (UTC)
Message
NO WORRIES - got it to work

used one trigger - triggers on

* tells you '*'

and sends world

tell %1 <auto reply> I am currently afk.

and calls this subroutine

sub afklog (thename, theoutput, thewildcards)
world.openlog "afklog.txt", append
World.writelog "" & thewildcards (1) & " tells you " & thewildcards (2) & ""
World.closelog
end sub


sweet :)
Top

Posted by Guest1   USA  (256 posts)
Date Reply #3 on Wed 18 Sep 2002 10:06 PM (UTC)
Message
oh - that should read

world.openlog "afklog.txt", false

rather than append at the end. hopefully someone will find this useful
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #4 on Thu 19 Sep 2002 12:57 AM (UTC)
Message
Quote:

I have set to send to notepad (append) this:

%1 tells you %2

but there isn't any notepad .txt files being created


It won't create a text file, it will append to a notepad window in MUSHclient. Are you sure there isn't such a window lurking behind the main world window?

Also, make sure both triggers are set to "keep evaluating" otherwise when the first one matches it won't go on and do the second one. That is probably your problem.

Doing that saves opening a file every time someone tells you something.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Guest1   USA  (256 posts)
Date Reply #5 on Thu 19 Sep 2002 07:47 PM (UTC)
Message
hehe yup. I had the 'keep evaluating' selected ok. Several hours after posting here when I went to log off and hit the sack, I discovered the lurking windows on MUSHclient as I was shutting it down.

I felt pretty stupid. :)

I'm reverting back to that double trigger one. The opening separate .txt files is a few more clicks than neccessary, as you said. I might find a use for it somewhere else though.

Thanks as always Nick :)
Top

Posted by Guest1   USA  (256 posts)
Date Reply #6 on Thu 19 Sep 2002 08:23 PM (UTC)
Message
As an afterthought Nick, would it take much to have the 1-10 world buttons along the top of MC also indicate (be clickable for) the notepad window(s)? It's rare for me to ever have more than 3 worlds open/available at any given time anyway, although I don't know if this is the same for most people.. *shrug*
Top

Posted by Guest1   USA  (256 posts)
Date Reply #7 on Thu 19 Sep 2002 08:31 PM (UTC)
Message
add on: I'm aware of the wonders of the right click button to open the notepad window, but it would still be nice to be able to make one of the activity tool bar buttons assignable to the notepad window if I wanted to.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #8 on Fri 20 Sep 2002 06:03 AM (UTC)
Message
This probably comes into the category of general improvements to customisation, eg. being able to assign any function to any keystroke. All this is planned for a future version.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Guest1   USA  (256 posts)
Date Reply #9 on Fri 20 Sep 2002 08:40 PM (UTC)
Message
great :)
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.


19,735 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.