YATCO - Yet Another Tabbed Chat Option. This time it blinks

Share your scripts and packages with other Mudlet users.
User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by demonnic »

I'll take a look tonight after I get home =) What's your toon's name, so I can see if you're around when I log in?

syrik
Posts: 90
Joined: Sat Jun 26, 2010 9:57 pm

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by syrik »

hadrian, thank you again

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by demonnic »

The issue is, you need to put one more line in the trigger code, between selectString(line,1) and the ChatStuff.Append calls

Code: [show] | [select all] lua
selectString(line,1)
copy()
ChatStuff.append("All")
ChatStuff.append("City")
deselect()

The original post has been edited to reflect this change. Sorry guys!

syrik
Posts: 90
Joined: Sat Jun 26, 2010 9:57 pm

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by syrik »

ah, ok, thanks again!

P.S. Where in the code is the font size? It seems a bit small.

User avatar
Omit
Posts: 190
Joined: Sun Aug 01, 2010 10:54 pm
Location: Middle Earth
Contact:

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by Omit »

Thank you... It works now :D

User avatar
Omit
Posts: 190
Joined: Sun Aug 01, 2010 10:54 pm
Location: Middle Earth
Contact:

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by Omit »

ok... here is a question... how do I set a trigger up to get the second/third line of a comm...
for example....

[ PoT ] Omit: Testing a long.... ................ ............... ...line
on a comm again

I can capture the the first line with a problem... but how would I get that second line too?

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by demonnic »

Syrik - line 2 =)

Omit:

Well, if you can't set your mud to let mudlet do the wrapping for you:

Make your initial trigger to capture. Set its fire length to 99

Make another trigger for your prompt (yeah, a second prompt trigger even if you've got one)

Drag it on to the first trigger for capturing the communication. This will cause it to become a subtrigger

In the code for the prompt child trigger, put in

setTriggerStayOpen("name of the parent trigger", 0)

Then make one more trigger. make it a lua function type trigger, and have the pattern be

return true


and put the same code to capture in this final trigger as you did in the first one.

Now, I know that's all kind of confusing. When you're done, you'll have three triggers in a tree view. I have put the name of the trigger (top line in the trigger dialog) in quotes.


"Initial Capture" (the one which captures the first line)
|
...."Prompt Detector" (if you get a prompt, that means the communication is done)
|
...."Matches everything" (if it's not a prompt, then we want to capture it)



So, "Initial Capture" is what you have now.

"Prompt Detector" matches on your prompt, and this is the one which has setTriggerStayOpen("Initial Capture", 0). This causes it to stop looking for chat stuff.

"Matches Everything" does exactly that. It will match absolutely anything.


The order of the triggers is important, as they are evaluated in order. When you set the fire length on "Initial Capture" to 99, you're essentially telling it that once it matches, it can evaluate its sub triggers for up to 99 lines. So we use "Prompt Detector" to get it to stop looking, and since everything between the first line of the communication and the next prompt should be a part of that communication, the third one captures anything it gets to examine. On the line where the prompt shows up, "Matches Everything" never even gets looked at, so it doesn't swallow your prompt up.

I hope that makes sense.

User avatar
Omit
Posts: 190
Joined: Sun Aug 01, 2010 10:54 pm
Location: Middle Earth
Contact:

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by Omit »

Thank you....

It took me awhile to get to it (but my automapper works now) but I did.....
I did not have a prompt after the comms to trigger on but....
wrapped lines all start with a white space so....
subtrigger was set to capture any line begining with a white space( ^(\s) ) and stop the trigger on any line that strats with anything other than a white space ( ^(\S) )

I never would have come up with that solution without you...

Thanks!!

User avatar
demonnic
Posts: 886
Joined: Sat Dec 05, 2009 3:19 pm

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by demonnic »

Awesome, I'm glad that helped you arrive at a viable solution.

Acarion
Posts: 4
Joined: Tue Sep 07, 2010 2:50 am

Re: YATCO - Yet Another Tabbed Chat Option. This time it blinks

Post by Acarion »

Hey!

First off I'm loving this package!

Quick question though (dumb one probably): Am I correct in thinking that I need to create a separate Trigger Item per Chat Channel, with each one having the following pasted in the trigger box?
Code: [show] | [select all] lua
selectString(line,1)
copy()
ChatStuff.append("All")
ChatStuff.append("Channel")
deselect()
For clarifications purposes I'm playing Achaea and belong to (Church):, (Shallam):, etc.

Edit #1: Oh, also I'm noticing that the chats are indeed being transfered to the newly created chat box at the upper right, but they're also remaining in the main buffer. Is there a way to make it so that they no longer appear in the main buffer stream?

Edit #2: And I just realized that for overly long chat messages, part of the messages is being cut off even though there is plenty of chat window left. Thanks!

And would it be possible to get an answer to that font size question? The text in the chat window is pretty small at the moment.

Thank you so much!!!

Post Reply