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 ➜ Seperate captures into different notepad windows with different names

Seperate captures into different notepad windows with different names

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


Posted by forral   USA  (79 posts)  Bio
Date Sat 10 Oct 2009 12:20 PM (UTC)

Amended on Sat 10 Oct 2009 12:35 PM (UTC) by forral

Message
*edit* Crap, my post got wiped out when I tried to copy my mud output.


I recently got, with help of Twisol, my wine to append captures to a notepad window. However, I would like to take it one step further and append captures to different windows, grouped together by category (clantalk, alliancetalk, and form talk in one....tells, pktalk, and relays in the other)

I noticed there is a command in the help file (Lua) of the following:

ActivateNotepad("Nick's Window")

Will that call a notepad with a different name every time the trigger fires? Or just once?

As per the trigger help submission guidelines, here is some info:

Literal copy of trigger: * tells you '*

Text to match: Duende tells you 'look at the mushclient forums'

Scripting language: Lua seems to be the easiest, but I am willing to learn any of them.

No error message

Does work, but appends them all to a new window. I would like 3 notepad windows to be created when I start MUSH, each corresponding to a different group of captures, and have the triggers selectively post to these 3 windows.

I am using version 4.43 of MUSHclient.



I hope the info I provided is useful in determining a solution which, I am sure, will be incredibly simple. I will tinker with some settings and post back if I have any luck.

Thanks for any help,
Killa


*EDITEDIT* Ok I had some mild success: I went through each trigger, and gave them each a separate label. However, now each and every capture opens up a separate window. How would I make it so that X X and X captures go in 1 window, and Y Y and Y captures go into another?
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #1 on Sat 10 Oct 2009 07:28 PM (UTC)
Message
I think what you really want is AppendToNotepad(). As per the documentation:

Quote:
Appends the text to a notepad window of the given title. If no such window exists, it is created.

The function "AppendToNotepad" does not activate (bring to the front) the notepad window. However the function "ActivateNotepad" can be used to do that.

You can use world.activate to activate the world itself (eg. you might want to do that after creating a notepad window).

You might use GetNotepadLength to check if there is likely to be room in the notepad for the new text.


ActivateNotepad(), as far as I know, only brings a specific notepad "to the front", which has no effect on appending.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by forral   USA  (79 posts)  Bio
Date Reply #2 on Sat 10 Oct 2009 09:37 PM (UTC)
Message
Twisol said:

I think what you really want is AppendToNotepad(). As per the documentation:

Quote:
Appends the text to a notepad window of the given title. If no such window exists, it is created.

The function "AppendToNotepad" does not activate (bring to the front) the notepad window. However the function "ActivateNotepad" can be used to do that.

You can use world.activate to activate the world itself (eg. you might want to do that after creating a notepad window).

You might use GetNotepadLength to check if there is likely to be room in the notepad for the new text.


ActivateNotepad(), as far as I know, only brings a specific notepad "to the front", which has no effect on appending.


Alright that solves part of the issue. Is there a way to split up my captures to go to different windows? Because from my experimentation, you cannot give two windows the same title, and I don't like having 6 windows all crowding up the screen. I've talked to some players in game and they say its really complicated coding to try and have the script target a specific window...can you shed some light on this twisol?
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #3 on Sat 10 Oct 2009 09:55 PM (UTC)

Amended on Sat 10 Oct 2009 09:57 PM (UTC) by Twisol

Message
After six script commands and some window resizing, I have this setup[1]. Each notepad has a numeric name here, but obviously that's not required. This is the script I used:

AppendToNotepad("1", "Notepad 1")
AppendToNotepad("2", "Notepad 2")
AppendToNotepad("3", "Notepad 3")
AppendToNotepad("4", "Notepad 4")
AppendToNotepad("5", "Notepad 5")
AppendToNotepad("6", "Notepad 6")


In practice, you might name one "Tells", and sort all TELLs you get into it. Another might be "TimeChanges", where you make a note of the passing of time in the MUD. Et cetera.

EDIT: Also, I'm not really sure what you want here. You don't want multiple windows cluttering the screen, yet you want your scripts to target multiple windows?

[1] http://img237.imageshack.us/img237/5578/mushnotepads.png

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by forral   USA  (79 posts)  Bio
Date Reply #4 on Sun 11 Oct 2009 05:24 PM (UTC)
Message
Twisol said:

After six script commands and some window resizing, I have this setup[1]. Each notepad has a numeric name here, but obviously that's not required. This is the script I used:

AppendToNotepad("1", "Notepad 1")
AppendToNotepad("2", "Notepad 2")
AppendToNotepad("3", "Notepad 3")
AppendToNotepad("4", "Notepad 4")
AppendToNotepad("5", "Notepad 5")
AppendToNotepad("6", "Notepad 6")


In practice, you might name one "Tells", and sort all TELLs you get into it. Another might be "TimeChanges", where you make a note of the passing of time in the MUD. Et cetera.

EDIT: Also, I'm not really sure what you want here. You don't want multiple windows cluttering the screen, yet you want your scripts to target multiple windows?

[1] http://img237.imageshack.us/img237/5578/mushnotepads.png



Sorry for confusing you Twisol, I wasn't very clear in what I meant.

What I meant was the way I had it set up was each trigger opening to a different window, and combine that with 6-8 triggers, it can get a bit messy. What I want to have it similar to what you have, except I will most likely only use 3 windows, and have 2 captures per window, that is all.

I will try this out and post my results, along with a screenshot.
Top

Posted by forral   USA  (79 posts)  Bio
Date Reply #5 on Tue 13 Oct 2009 02:02 PM (UTC)
Message
Good news, I was able to get my captures working. Since I was running MUSH on Wine, the VBScript and Lua languages didn't seem to want to work (for whatever reason). I was able to get my captures working by using the Jscript language, and my friend in the game provided me the code snippet.

I further went on to customize some of the options, like tabs along the top to help me keep all my captures organized. Everything works perfectly and thanks alot for your help Twisol.
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #6 on Tue 13 Oct 2009 05:08 PM (UTC)

Amended on Tue 13 Oct 2009 05:55 PM (UTC) by Twisol

Message
L337killa07 said:
Since I was running MUSH on Wine, the VBScript and Lua languages didn't seem to want to work (for whatever reason).


That's strange; those are the two that should work out of the box under both Windows and Wine. Regardless, glad to hear it's working for you!

EDIT: At least Lua; I'm not entirely sure about VBscript.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #7 on Tue 13 Oct 2009 08:45 PM (UTC)
Message
Lua should certainly work under Wine, I have tested lots of Lua plugins on Wine.

Make sure that you have your Wine emulation set to Windows 98, if not, various things may crash the client (particularly opening notepad windows).

When you say "Lua languages didn't seem to want to work" - in what way? Did they crash? Was there an error message?

- Nick Gammon

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

Posted by forral   USA  (79 posts)  Bio
Date Reply #8 on Wed 14 Oct 2009 12:26 PM (UTC)
Message
Nick,

When I tried using Lua, the captures just didn't show up. I cannot remember the bit of code I used right now but I will find it and post it. And I will also make sure I am emulating under windows 98, although I'm sure I set that option previously.

If I recall, I think there WAS an error message, but again I cannot remember and would have to wait until later today to post it (after class, of course).

Both Lua and VBscript gave me errors when trying to run the captures using Wine, but perhaps it was just my fault and my novice coding skills.

Sorry for the vague details but like I said I cannot remember off the top of my head. I will boot into Linux later today, load up wine, and try to replicate the errors and post the error codes.
Top

Posted by forral   USA  (79 posts)  Bio
Date Reply #9 on Thu 15 Oct 2009 12:19 PM (UTC)
Message
Error number: -2146827273
Event: Execution of line 1 column 90
Description: Unterminated string constant

Line in error:

world.AppendToNotepad("Misc", "[PKTALK C] Haley: 'about to sac this piece of crap jhepps'
Called by: Immediate execution


Ok thats the error. What I did was take my world file that works perfectly in Wine under Linux, all the captures work fine using JScript, I copied + pasted it over into windows, loaded the world file, and it starts giving me that error.

Not sure what the issue may be. if you need any more details let me know please.
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #10 on Thu 15 Oct 2009 04:32 PM (UTC)
Message
You don't properly terminate the command. You'll probably want to put a ") at the end of that line, one to end the string and one to end the list of parameters.
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #11 on Thu 15 Oct 2009 04:33 PM (UTC)
Message
Quote:

world.AppendToNotepad("Misc", "[PKTALK C] Haley: 'about to sac this piece of crap jhepps'")


I think your code needs to be

AppendToNotepad("Misc", "%0")


you're missing the close quote (which terminates the string)
Top

Posted by forral   USA  (79 posts)  Bio
Date Reply #12 on Fri 16 Oct 2009 02:42 AM (UTC)
Message
Oh of course, I knew it was something silly like that...

I have been a bit distracted lately but I am going to spend some time this weekend to sort these captures out....I want to just use 1 language across both OS's to keep things simple.

Thanks everyone for the help!
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.


33,990 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.