I'm looking for a plugin that will play a noise or something similar if a window in mushclient that I have minimized gets output. Also, something that would automatically save all logs to a folder with each time I open a specific world to have it's own log that is named with the world name, a date and time. If these already exist, I haven't been able to find them. And if they don't how hard would it be to learn to code them, as I have no previous knowledge of XML or mushclient plugins.
Looking for two specific plugins, can't find them.
Posted by Carpe_Mofo on Tue 03 Jul 2007 11:05 AM — 7 posts, 29,730 views.
For the logging, you don't need a plugin at all. Just go to the General->logging section in the world configuration window (alt-3) and take a look at the help window. You can set the log file to be something like this:
c:\foo\%N_%Y-%m-%d
That will have the log saved so that if you sort all of the files, they will be grouped by world name, and be in chronological order.
c:\foo\%N_%Y-%m-%d
That will have the log saved so that if you sort all of the files, they will be grouped by world name, and be in chronological order.
I think I figured out the sound one. Have a trigger match everything just match="*", then have the following sent to script:
This example used Lua, so if you have a different language set for scripting, you will have to change things around a bit to work. http://www.gammon.com.au/scripts/function.php?name=GetInfo for more help with the GetInfo function... there's a LOT in there.
If GetInfo(238) == 6 then
Sound("ding.wav")
end
This example used Lua, so if you have a different language set for scripting, you will have to change things around a bit to work. http://www.gammon.com.au/scripts/function.php?name=GetInfo for more help with the GetInfo function... there's a LOT in there.
Thank You! But will the sound one only work on a window in Mushclient I'm not looking at? I don't want it to beep every time something new happens in a window I'm looking at.
hrm... I ran into an odd problem. I tried making that trigger to test it out, and I can't get it to play a sound.
The above will cause a ding to be played if I run it in the command line, but it will not work if I put it in a trigger. If anyone could explain this, I'd appreciate it.
Figure I might as well post the trigger too.
if GetInfo(238) == 3 then Sound("C:\windows\media\ding.wav") endThe above will cause a ding to be played if I run it in the command line, but it will not work if I put it in a trigger. If anyone could explain this, I'd appreciate it.
Figure I might as well post the trigger too.
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="*"
name="testsound"
send_to="12"
sequence="1"
>
<send>if GetInfo(238) == 3 then Sound("C:\\windows\\media\\ding.wav") end</send>
</trigger>
</triggers>
A quick test of what GetInfo was actually returning shows that you need to test against 2 (Showminimized).
This works:
This works:
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="*"
name="testsound"
send_to="12"
sequence="1"
>
<send>
if GetInfo (238) == 2 then
Sound ("ding.wav")
end
</send>
</trigger>
</triggers>
When I was testing it though, I was using a maximized window. I just wanted to make sure that the trigger would work before trying it minimized where I couldn't see errors popping up. GetInfo(238) returned a 3 for maximized, so I tried if GetInfo(238) == 3 then Sound("C:\\\\windows\\\\media\\\\ding.wav") end out in the command window, and it worked. However, the trigger I showed did not work, even though if I put a "Note(GetInfo(238))" in there, it returned 3, which is what I was testing for.