Tabbed scrolling miniwindow

Posted by Xinefus on Tue 11 Aug 2020 12:56 PM — 49 posts, 152,075 views.

#0
Ref: a. My beginnings - http://www.gammon.com.au/forum/?id=14661
b. Tabbed Miniwindow - https://www.gammon.com.au/forum/?id=14161
c. Scrolling Text - http://www.gammon.com.au/forum/?id=13916
d. Fiendish's tabbed miniwindow - https://github.com/fiendish/aardwolfclientpackage/blob/MUSHclient/MUSHclient/worlds/plugins/aard_channels_fiendish.xml
e. My miniwindow chat - https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_Chat_Miniwindow.xml
f. my_chat.lua - https://github.com/DBNU-Braska/DBNU/blob/non-msdp/My_Chat_Window.lua

Good day!

I'm back at it again and as always a little lost.

I was looking into how Fiendish does his tabbed miniwindow over on Aardwolf (ref d), but that I believe is much too big of a jump for me from what I have right now, ref e/f.

Some background. I started with having a single miniwindow that had all the different channels being captured into it. I moved on to using a couple of different miniwindows, each with different channels. What I would like to do now is to be able to put these all back into '1' miniwindow that is tabbed.

Of course the way that Fiendish has done it is so elegant and works great for Aardworlf, though it's a huge jump.

Some of the features I would like right now are:
  • Scrolling text with mousewheel
  • resiseable miniwindow
  • add/remove tabs
  • selectable text within tabs (for copy/paste)


I think that the add/remove tabs part is probably not within my knowledge right now, I tried to read what Fiendish has done but with the untagged_channels, and non-channels bits, I got a bit overwhelmed when having to deal with so many different xml/lua files. Maybe I'm biting off too much at once.

I currently have a miniwindow that works and grabs all the info I want it to... I just can't select text (other than it copies the full line) nor does it mousewheel scroll.

Where should I start when it comes to working with this? I am unsure but believe that my current chat_miniwindow might be a bit out of date and may need to be redone to accommodate the features that I would like.

In my mind, I know this is completely possible, it's just taking me awhile to get things put into perspective. I thought if I would share my idea, I could get some insights and wisdom along with motivation to help me move forward.

Thanks for your help folks. (also for fiendish, whom received an unsolicited email from me, I apologise for that. You were kind and answered my questions, but I have stopped myself countless times from sending you more questions!... )
Amended on Tue 11 Aug 2020 03:23 PM by Xinefus
USA Global Moderator #1
Selectable text in a miniwindow is a huge amount of work if you want to invent it from scratch, but you can use mine. It's entirely modular except for the dependency on my color functions, which you'd have to customize for any MUD that doesn't do color codes the same way Aardwolf does. It does wrapping, selecting, copying with or without color codes, wheel scrolling, scrolling while selection dragging, clickable hyperlinks, custom callbacks on display update, custom extendable right-click menu, and bold font display.

https://github.com/fiendish/aardwolfclientpackage/blob/MUSHclient/MUSHclient/lua/text_rect.lua
https://github.com/fiendish/aardwolfclientpackage/blob/MUSHclient/MUSHclient/worlds/plugins/aardwolf_colors.lua

My chat plugin binds the above to my vertical scrollbar module.

https://github.com/fiendish/aardwolfclientpackage/blob/MUSHclient/MUSHclient/lua/scrollbar.lua

I'd appreciate a mention if you use and enjoy them.
Amended on Tue 11 Aug 2020 05:18 PM by Fiendish
#2
Fiendish said:

which you'd have to customize for any MUD that doesn't do color codes the same way Aardwolf does.


Looking at the two files, you said that I'd have to rewrite the custom colours to work with my specific MUD.

I suppose the colours.lua file is the best place to start...

In my specific MUD - the ANSI colours are called with the & (amp) prefix character and the xterm colours with the ` (tilde?) prefix character.

Like your file, &r would be red, and &R would be bright red (bold ansi).

For xterm, `y being dark yellow (i.e. ansi orange) and `Y being bright yellow (i.e. ansi bright yellow). You can also use xterm by using the full colour codes such as `[F005] being bright blue (i.e &B or ansi bright blue).

That being said, before I even get into the functions within the file, I seem to have an ansi prefix and a different xterm prefix. But I should be able to define an XTERM_PREFIX and redefine XTERM_CODE, right?

I don't believe I have a 300, 260, 250 pattern differences, only X_NONNUMERIC_PATTERN and X_DIGITS_CAPTURE_PATTERN.

What does TILDE_PATTERN define in your case?

Ok, enough questions for one post. I will upload my version of this to Git here: https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_colours.lua

Thanks!
#3
To add some context,

All the channels that I am looking for, without colour tags, but at least what they look like:

https://github.com/DBNU-Braska/DBNU/blob/non-msdp/channel_text.txt

Here is my help colours. It's pretty close to a basic SMAUG.

https://github.com/DBNU-Braska/DBNU/blob/non-msdp/help_colours

And my xterm file:

https://github.com/DBNU-Braska/DBNU/blob/non-msdp/help_xterm

They have Kavir's snippet which adds xterm colour support.

https://github.com/Xavious/MSDP_Protocol_Handler
Amended on Tue 11 Aug 2020 11:13 PM by Xinefus
USA Global Moderator #4
Xinefus said:

` (tilde?)

` is a backtick. ~ is a tilde.
Quote:

But I should be able to define an XTERM_PREFIX and redefine XTERM_CODE, right?

Sure

Quote:
What does TILDE_PATTERN define in your case?

For unimportant historical reasons, Aardwolf converts "@-" into "~".

Quote:
Ok, enough questions for one post.

That was only 3 questions.
Amended on Wed 12 Aug 2020 01:08 AM by Fiendish
#5
Thanks for the info.

I'm looking at the aardwolf_colours.lua file and how it relates to text_rect.lua.

From what I can see, and from what I was able to test while logged into Aardwolf was that the colours.lua file enables the ability to copy/paste text/characters within the communications log WITH Aardwolf colourtags. When you right click you get either copy, copy no colour, or copy all.

I am not sure I have a use case that requires me to get the colour tag from the comm log. Thus, if I were to not need that functionality, would I be able to remove the functions used within text_rect.lua that call to aardwolf_colours.lua?

Some of the parts I'm seeing are

table.insert(s_text, StylesToColours(current_message))
         current_message = {}

and just have

table.insert(s_text, current_message)
         current_message = {}


I currently don't see a usecase in my MUD to have the ability to pull out/translate into colourtags.

Let me know what you think.
#6
Ref: https://github.com/DBNU-Braska/DBNU/tree/non-msdp

Sooo, I may have did a "daddy biiig mess" as my daughter would say.

I have went through the following files and made an effort to remove the requirement to do any colour formatting functions from within aardwolf_colors.lua.
I've renamed some of them, just so I can track which ones I am working on. I have also removed the parts that reference GMCP as I don't have that in the MUD at this time. Lastly, I have not updated the triggers yet, which is going to be the main method at the moment in how I will grab the MUD Channel texts.

The files I've went through and taken a look at are:
  • aardwolf_colors.lua
  • aard_channels_fiendish.xml
  • aard_miniwindow_z_order_monitor.xml
  • aard_register_on_z_create.lua
  • mw_theme_base.lua
  • repaint_buffer.xml
  • scrollbar.lua
  • text_rect.lua
  • aard_theme_controller.xml


I have moved/loaded all the files, to try and see if I could at least get the aard_channels_fiendish to load (and not do anything yet...), without success. There were a few bugs of where I didn't comment out the closing of an if/end etc, but now I am stuck with a different error and I don't know how to find it.

When I load DBNU_channels_fiendish.xml I get:
Line   87: Attribute name must start with letter or underscore, but starts with "-" (Cannot load)


I've looked through the code but cannot seem to locate this error at this time.

Is it too much to ask for someone to have a look at this for me? I'm using a fresh install of MUSHClient 5.06. I've added the above files into their respective folders.

If you want to have a look at it within my MUD, it can be found at: dbnumud.com:4321 I'm usually logged in and can be found as Braska(IMM IGN). I am not the owner of this one, but it is the primary one I am doing work on at this time.
Amended on Thu 13 Aug 2020 11:58 AM by Xinefus
USA Global Moderator #7
You've tried to comment out a section of the plugin XML using Lua comment indicators instead of XML comment indicators. XML doesn't use -- for comments.
#8
You are absolutely correct! Thank you for pointing that out.

I have a couple more errors and questions to ask.

First thing was that I had to add banker_round() to the file as it didn't seem to exist anywhere. I found a post on the forums here that had it, so I just used it from there.

The next thing I have now is that rightclick is not working correctly.

Error number: 0
Event:        Run-time error
Description:  C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:844: attempt to index local 'ems' (a nil value)

stack traceback:

	C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:844: in function 'rightClickMenu'

	C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:659: in function <C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:655>
Called by:    Function/Sub: TextRect.mouseUp called by Plugin DBNU_Chat_Capture_Miniwindow

Reason: Executing plugin DBNU_Chat_Capture_Miniwindow sub TextRect.mouseUp


When I take a look at text_rect, I can't seem to find the function that ems is supposed to be tied to

local ems = self.external_menu_string_generator()
--- (and further up the file) ---
function TextRect:setExternalMenuFunction(menu_string_generator, menu_result_function)
   self.external_menu_string_generator = menu_string_generator
   self.external_menu_result_function = menu_result_function
end


Where can I find this external... function? I looked throughout the client folders but didn't seem to be able to locate it..

Thanks!
#9
I just finished adding in all of my triggers for each channel.

I went through and worked out which of my channels are non-channels vs channels like the original so that I could mimic the same functionality.

I give it a run, and first time logging in, I get:

Error number: 0
Event:        Run-time error
Description:  C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:100: bad argument #1 to 'gmatch' (string expected, got table)

stack traceback:

	[C]: in function 'gmatch'

	C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:100: in function 'findURLs'

	C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:115: in function 'addStyles'

	[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:704: in function 'storeTab'

	[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:723: in function 'storeNonChannel'

	[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:632: in function 'stampAndStore'

	[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:685: in function <[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:684>
Called by:    Function/Sub: chats called by trigger

Reason: processing trigger "Info" when matching line: "[Info] -> Alucard has joined the game!"


Looking at gmatch, it is being supplied a table from 'rex'?

Also, the matching line is NOT a url, so is it thinking it is for some reason?
USA Global Moderator #10
Quote:
First thing was that I had to add banker_round() to the file as it didn't seem to exist anywhere.


It's round_banker, and I put it in my copy of commas.lua for some reason. I don't remember why.

Quote:
Where can I find this external... function?

You must have called setExternalMenuFunction in your plugin.

Quote:
Looking at gmatch, it is being supplied a table from 'rex'?

No it isn't. findURLs expects plain text, not a table. You've removed my color functions so now you have nothing converting the styles into plain text anymore. You can't just remove function calls and expect things to keep working without dealing with the results from your changes.
Amended on Fri 14 Aug 2020 11:10 PM by Fiendish
#11
Fiendish said:

You've removed my color functions so now you have nothing converting the styles into plain text anymore.

Point taken.

Is it possible that you could provide examples for the patterns within aardwolf_colors.lua?

I think I am going to have to modify some of the code to accommodate for how my MUD does ansi colour (using prefix "&") vs xterm colour (using prefix "`").

I tried looking at helpfiles within Aardwolf, but I can't seem to find an example of how it shows ansi vs xterm colours. (X_NONNUMERIC_PATTERN, X_THREEHUNDRED_PATTERN, X_TWOSIXTY_PATTERN, X_TWOFIFTYSIX_PATTERN, X_DIGITS_CAPTURE_PATTERN, X_ANY_DIGITS_PATTERN)

I am trying to understand how to make my own colourtostyles (and vice-versa) with the fact that not all my colours use the same prefix. In aardwolf_colors.lua it has
if code == XTERM_CODE then -- xterm 256 colors
already inside CODE_PREFIX. I think I need to modify mine here since my xterm colours are in the form `[%D%d%d%d].

If you look at the xterm helpfile ref'd earlier you can see that all my xterm colours are in the form `%s for a few presets, and then in the form `[(F or B)%d%d%d], so they are all in the form of 3 digits preceded by a F (foreground) or B (background).

Is that right? I'm trying to understand this correctly and write my own file based on the aardwolf one here.
Amended on Sun 16 Aug 2020 10:31 PM by Xinefus
USA Global Moderator #12
Quote:
Is it possible that you could provide examples for the patterns within aardwolf_colors.lua?

I thought you said you weren't going to bother with colors at all? Anyway, you don't need to know how color codes work to extract plain text from styles as is needed for the findURLs function. Just iterate over the styles and pull out the .text fields and concatenate them.

Quote:
I tried looking at helpfiles within Aardwolf, but I can't seem to find an example of how it shows ansi vs xterm colours


`help colors`
http://www.aardwolf.com/wiki/index.php/Help/Colors
`help xterm`
http://www.aardwolf.com/wiki/index.php/Help/xterm

@r and @R and @b and @B etc. are regular colors.
@x1 and @x01 and @x001 are xterm colors. Aardwolf allowing non-zero-padded forms makes things more complicated.

Quote:
B (background)

Aardwolf doesn't do background colors. Good luck! The extra work to add background colors may be nontrivial.
Amended on Tue 18 Aug 2020 09:22 PM by Fiendish
#13
Well, I really like your plugin. The more I can learn from it and actually implement it's capabilities, the better set I am for other plugins I want to write.

So, my mud has used Kavir's snippet to implement xterm 256 colours. Not a huge thing but there is a bit of a problem in that the sequencing of numbers used to show colors goes from 000-555 but in base 6. For example, the first set of colours uses 000-005, 010-015, 020-025, 030-035, 040-045, 050-055. Then it jumps to 100.. all the way to 155, then 200 to 255, up to 555.

All I have right now, is a box that won't grab text and throws an error when I right-click it. But hey, I have a box! And it's glorious!
USA Global Moderator #14
Well, I'd start by putting my color functions back in place and then replacing or updating only the ones that deal with codes. Some of those functions like TruncateStyles and strip_colours_from_styles are critical and not affected by different color code schemes.

The only part of text_rect that cares about color codes is the OPTIONAL addColorLine method and the OPTIONAL copying with color codes.
Amended on Thu 20 Aug 2020 04:26 PM by Fiendish
#15
Ref: https://github.com/DBNU-Braska/DBNU/tree/non-msdp

So I am trying to trace the path of information through the script so that I can understand where things may be going wrong for me. I've been trying to remove some of the colour stuff, but it is hard as some functions in the colour file don't necessarily do 'only' colour stuff.
I'm trying to trace the error from Reply #9. And in doing so, try to understand how the miniwindow prints the text.
When I run a test trigger in MUSHClient (all my files can be found at ref), the information is right away picked up and sent to my first function (non_channel) as it should, sent to stampAndStore and then storeNonChannel. I get(i just did some prints):
-Non-Channel-
Name:  Info
Line:  [Info] -> Alucard has left the game.
Wildcards:  table: 07781C20
Styles:  table: 077860B0
-stampAndStore-
msg sent to filter_as_needed
-filter_as_needed-
msg sent to ColoursToStyles:
Sent to storeNonChannel
-storeNonChannel-
styles:  table: 07785E10
label:  Info 

I'm not yet very good with tables, I understand them, but I don't know how gmatch is supposed to get a string when all along styles is a table (line 100 in text_rect.lua). Can someone explain/teach/enlighten me on how this works?
Amended on Thu 20 Aug 2020 04:31 PM by Xinefus
USA Global Moderator #16
Quote:
some functions in the colour file don't necessarily do 'only' colour stuff

There are your server's color codes embedded into text, and there are ANSI sequences embedded into text, and there are MUSHclient's style run tables, and they are all different, and manipulating them requires navigating the different ways that they encode color information.


Quote:
I don't know how gmatch is supposed to get a string when all along styles is a table


Notice the word "text" in
re:gmatch(text,



Also the word "text" in
function TextRect:findURLs(text)



You've done:
local urls = self:findURLs(styles)
Notice the word "styles".


I do
local urls = self:findURLs(strip_colours_from_styles(styles))
See the difference?


This is why I said that you can't just remove functions calls and expect things to keep working without dealing with the results from your changes.
Amended on Thu 20 Aug 2020 05:07 PM by Fiendish
#17
Oh gosh, I thought I had reverted all your colour stuff. Thank you.

So, the miniwindow prints the line of text that I throw at it. (almost perfectly)

I don't think I fully understand the extent of what your colour files do compared to the original chat_miniwindow that I have.

When I use the test trigger function within MUSHClient, I send/receive the following:
Send:[Info] -> Alucard has left the game.
Receive: &w[Info] -> Alucard has left the game.

It seems to be spitting out the code_prefix and w (white?).

Also, when I actually login and see how it performs, it works, but I don't understand how/why it is striping all the colours? I'm going to try and trace this one down now.

What part have I done wrong?
Amended on Thu 20 Aug 2020 06:30 PM by Xinefus
#18
From what I can gather, the only part that I have omitted from your original code now is:
rc, msg = CallPlugin("48f867c18f6ff1d6d3b52918", "filter_string", msg)
Looking at this, it seems it requires the message to be run through
canonicalize_colours(msg):split("%f[@]@x%d%d%d", true)


I don't believe this is going to work out very good for me. I'm still trying to figure out if I am able to do colours the way you have. Ansi colours are easy, but the xterm stuff is not trivial for my MUD, and this function will undoubtedly be the death of me.

Then that split. In my MUD, colours are shown with both &%D format for ansi and `[F%d%d%d] format for xterm.

*scratches head furiously*
Amended on Thu 20 Aug 2020 07:20 PM by Xinefus
USA Global Moderator #19
Xinefus said:

From what I can gather, the only part that I have omitted from your original code now is:
rc, msg = CallPlugin("48f867c18f6ff1d6d3b52918", "filter_string", msg)



You don't need that. That's for my gag/sub plugin, which is unrelated. You can just remove references to filter_as_needed from the plugin.
Amended on Thu 20 Aug 2020 09:13 PM by Fiendish
#20
Hey, the colour came back!

All my triggers are working (it seems) except for one:
 match="[DBNU Auction House] (.+)$", and example being: [DBNU Auction House] -> The item [Some Instant Rice] is being auctioned for [0] Zeni by the player Braska

Function/Sub: non_channel called by trigger
Reason: processing trigger "Aution_House" when matching line: "[DBNU Auction House] -> The item [Some Instant Rice] is being auctioned for [0] Zeni by the player Braska"
[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:726: attempt to index field '?' (a nil value)
stack traceback:
        [string "Plugin: DBNU_Chat_Capture_Miniwindow"]:726: in function 'storeNonChannel'
        [string "Plugin: DBNU_Chat_Capture_Miniwindow"]:630: in function 'stampAndStore'
        [string "Plugin: DBNU_Chat_Capture_Miniwindow"]:685: in function <[string "Plugin: DBNU_Chat_Capture_Miniwindow"]:684>


Any ideas what it is thinking here? the regex works since it is taken from my other miniwindow plugin, but it doesn't seem to like it here.

Lastly, I'm going to start looking at this right-click issue. Seems hotspots (which I don't fully understand) may not all be working? the scroll-wheel doesn't seem to be working yet either - doesn't throw any errors, but doesn't scroll other than with the scroll-bar.
Function/Sub: TextRect.mouseUp called by Plugin DBNU_Chat_Capture_Miniwindow
Reason: Executing plugin DBNU_Chat_Capture_Miniwindow sub TextRect.mouseUp
C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:844: attempt to index local 'ems' (a nil value)
stack traceback:
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:844: in function 'rightClickMenu'
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:659: in function <C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:655>
That's the right-click error. I had mentioned it earlier. Where do I find
self.external_menu_string_generator
Amended on Thu 20 Aug 2020 11:34 PM by Xinefus
USA Global Moderator #21
It looks like there was a bug in my plugin where the right-click menu text didn't get returned if my echo plugin wasn't loaded. Move https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_channels_fiendish.xml#L1349 one line down.
#22
Thanks Fiendish, that certainly made things start to look a lot more interesting.

As stated earlier, it seems to be catching everything except the auction house channel. Not sure what is causing that one yet, but I haven't looked into it much actually.

I wanted to keep moving forward with the capabilities of the plugin. I am working on adding the echo capability. It seems that the plugin works so far as it removes echo for my non-channels, but not for the channels. I believe because I am not getting the channels from gmcp, I may have missed a few things when rewriting? I have added all the triggers, from the channels.xml. I don't believe I have added all the functionalities for channels yet and may still have some stuff commented out that I shouldn't.

Another question I have is ref addDefaultchannels or addDefaultnonchannels: Since all of my info is coming from triggers, should I be enabling all the channels and nonchannels within the respective function or can I just have them set to enabled="y" right from the beginning?
USA Global Moderator #23
I don't have answers for "should" questions. If it works, then it's good. :)
Amended on Mon 24 Aug 2020 12:37 AM by Fiendish
#24
Ref: a. https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_chat_echo.xml
b. https://github.com/DBNU-Braska/DBNU/blob/non-msdp/DBNU_channels_fiendish.xml

Working through the two plugins (chat_miniwindow, chat_echo), I've run into two issues.

1. With the Chat_miniwindow: I can't seem to get the trigger for my auction channel to work. It works in a regular chat miniwindow, but doesn't seem to want to in this plugin.

Is this something to do with it having more than one set of "[]" in the string? I can't seem to find the error.

2. With chat_echo: I somehow have mixed the tables up. My non-channels work just fine, but the channels do not work at all. I added a check within the code (ref a), 449-455, and notice that my channels are being included in my non-channels.

Can someone show me how/where I have gone wrong with the channels_table vs nonchannels_table?

Thanks again!
USA Global Moderator #25
Quote:
I can't seem to get the trigger for my auction channel to work. It works in a regular chat miniwindow, but doesn't seem to want to in this plugin.

You misspelled the name of the trigger.

Quote:
My non-channels work just fine, but the channels do not work at all.

You enable your nonchannel triggers but not your channel triggers.
#26
ugh, spelling! Thank you.

To elaborate on my second problem. If you saw within my DBNU_channels, I had tried to do a enabletrigger/check_channel_trigger in extend_rightclick_menu_result. When I did this, I cannot change any of the "edit channel captures" under "Tab capture settings". They all just stay enabled.

The table issue as mentioned in my last post, I cannot seem to add/remove echo for my channels. The tables somehow are mixed up and can't find it. From the check I added, this is what shows up when I do "chats echo" and have "Echo none"
Current channel echo status: 
Ask_Answer false
Clan false
FriendChat false
IMM false
Music false
Newbie false
OOC false
RP_Chat false
Race false
Scouter false
Wartalk false
Yell false
say false
say_get false

Current non-channel echo status: 
Ask_Answer false
Auction_House false
Auto_Events false
Clan false
Clan_Info false
FriendChat false
Friend_Info false
HighScore false
IMM false
IMM_Logs false
Info false
Music false
Newbie false
News_Flash false
OOC false
RP_Chat false
RP_Story false
Race false
Scouter false
Wartalk false
Yell false
say false
say_get false

and when I do it again with "echo all":
Current channel echo status: 
Ask_Answer true
Clan true
FriendChat true
IMM true
Music true
Newbie true
OOC true
RP_Chat true
Race true
Scouter true
Wartalk true
Yell true
say true
say_get true

Current non-channel echo status: 
Ask_Answer false
Auction_House false
Auto_Events false
Clan false
Clan_Info false
FriendChat false
Friend_Info false
HighScore false
IMM false
IMM_Logs false
Info false
Music false
Newbie false
News_Flash false
OOC false
RP_Chat false
RP_Story false
Race false
Scouter false
Wartalk false
Yell false
say false
say_get false
See how in the nonchannel echos the channel echos are in there? I can't find where I mixed those up. Note that it does not change the echo state of the channels at all. They still do not echo.
Amended on Tue 25 Aug 2020 02:28 PM by Xinefus
#27
Call me a liar... I did just uncomment those lines within extend_rightclick_menu_result and it seems that part is working now.

The rest I'd still like some insight.
Amended on Tue 25 Aug 2020 03:08 PM by Xinefus
USA Global Moderator #28
Delete your state file.
#29
No change. Still cannot change the echo settings for my channels. Non channels seems to work fine.

I don't understand how the end_gag trigger group interacts with all the triggers. I see that it is set whenever I use the non-channels, but I don't have the same for channels.

Is this what I should have when I enable/disable echo for channels?
Amended on Tue 25 Aug 2020 07:29 PM by Xinefus
USA Global Moderator #30
You aren't using GMCP for channels, so your channels and non-channels are split entirely arbitrarily. You should be doing exactly the same thing for both of them. If you're not, where and why not?
Amended on Tue 25 Aug 2020 07:36 PM by Fiendish
#31
I think the reason why they are not exactly the same in the first place is due to how i understand enable_hiding to work.

I am not sure how to add the for loop for init_channel_keys so that when I do use enable all/none it only affects the channels.
USA Global Moderator #32
The only reason any of _my_ settings are handled differently from each other is that Aardwolf use GMCP for channels and not for other things. You're not doing that so you should not be handling them differently. You can have as many groups of things as you want, but if all you're doing is toggling triggers, they should all end up in the same code doing the same things.
Amended on Tue 25 Aug 2020 09:15 PM by Fiendish
#33
Yes, I understand that getting the info from GMCP will be different. I was trying to keep channels (you can talk/influence these) and nonchannels (broadcasts/events/non-discussion) separate.

I believe I have chat_echo working the way I would like from a functionality sense. However, in the background I am still getting a mixup in tables. Not sure how to clear all the 'cache' maybe to fix things? When I print out the channel table, and the nonchannel table, I get channels included in the nonchannels.

Is there something I am doing wrong here? I still haven't been able to decipher the tables in knowing why they get included in each other...
#34
Ref: https://github.com/DBNU-Braska/DBNU/blob/non-msdp/text_rect.lua

I am working on the copy ability within the plugin. I have been able to get copy all working without copying colour codes. However, I can't seem to understand what my problem is with copying a selection of text.

I believe that my error is somewhere within TextRect:selected_text() but I'm not exactly sure.

The error suggests it is coming from table.concat(). I do believe it is coming from line 953 where I, like stated before, I'm not fully comfortable with how to manipulate tables.

Here is the error:
Function/Sub: TextRect.mouseUp called by Plugin DBNU_Chat_Capture_Miniwindow
Reason: Executing plugin DBNU_Chat_Capture_Miniwindow sub TextRect.mouseUp
C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:990: invalid value (table) at index 1 in table for 'concat'
stack traceback:
        [C]: in function 'concat'
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:990: in function 'selected_text'
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:930: in function '?'
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:868: in function 'rightClickMenu'
        C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:659: in function <C:\Program Files (x86)\MUSHclient\lua\text_rect.lua:655>
USA Global Moderator #35
The problem as ever is that you've made a change that doesn't account for what the original was doing. StylesToColours takes a table and produces a string. That means that current_message is a table and s_text is supposed to be a table of strings. But now you're generating a table of tables instead of a table of strings. Tables cannot be concatenated together by "\n". Only strings can.
Amended on Thu 27 Aug 2020 01:52 PM by Fiendish
#36
Fiendish said:

StylesToColours takes a table and produces a string.
Thank you for the nudge in the right direction. I don't think I know how to create this on my own, but I can at least read StylesToColours and remove the parts that are causing me this problem now.

I'm going to read through chat_echo again and try to see if I can pinpoint the issue with the combining tables...

Thanks so much for your support.
#37
Ok, so a fresh install fixed the tables issue. If at all possible, is there a way to do this type of reset/refresh without that?

Onto scrollbar.lua, it seems that I can't scroll with my mousewheel. Is there something in MUSHClient settings that I need to change to enable this? It works out of the box within AardMUSH, but having it included/required for my DBNU_Channels_fiendish.xml doesn't make any difference.
#38
Sorry, I'm getting mixed up with my scroll research.

I'm looking through text_rect.lua for the scrollable parts. Trying to see where maybe I have gone wrong here? But I don't think I've changed anything wrt scrolling.
USA Global Moderator #39
Quote:
Ok, so a fresh install fixed the tables issue.

I said to remove the state file, and you said you did. Did you do it while MUSHclient was still open? Or maybe you deleted the wrong ones?

Quote:
If at all possible, is there a way to do this type of reset/refresh without that?

If you change what gets stored and how without changing what subsequently gets read back in, then no. You have to clear the bad saved state data.

Quote:
I can't scroll with my mousewheel. Is there something in MUSHClient settings that I need to change to enable this?

Nope. Nothing.
Amended on Fri 28 Aug 2020 02:20 PM by Fiendish
#40
Thanks for the info Fiendish,

I did delete the files within state, and it did not seem to do anything. In fact, now there just are no files in there at all. Is there somewhere else I am supposed to find them?
This might be useful as I am also looking to figure out where some of the tables are saved, or how to save things like (different topic...) maps. I'll most likely make a different post for that plugin, but wondered where I am supposed to find saved items like that.

WRT the mouse-wheel scrolling, is there anything someone can help me with here? It seems perhaps it has to do with hotspots, but I haven't changed anything about them in any of the files compared to the originals.
USA Global Moderator #41
Quote:
I did delete the files within state, and it did not seem to do anything. In fact, now there just are no files in there at all. Is there somewhere else I am supposed to find them?

Where are you looking? Where is your MUSHclient folder?
#42
When I originally removed the state files, they were within \MUSHclient\worlds\plugins\state. My MUSHClient is installed as a normal install and is in C:\Program Files (x86)\MUSHclient
Amended on Tue 01 Sep 2020 02:12 PM by Xinefus
USA Global Moderator #43
Quote:
My MUSHClient is installed as a normal install and is in C:\Program Files (x86)\MUSHclient


Don't put it there.
Windows will hide the files from you if an application tries to write to "C:\Program Files\" and put them under C:\Users\<My Account>\AppData\Local\VirtualStore\

Try these links for more info
https://domainwebcenter.com/invisible-files-in-windows-7-program-files/
https://www.networkinghowtos.com/howto/windows-virtual-store-location/
Amended on Tue 01 Sep 2020 02:44 PM by Fiendish
#44
Thanks for that tip.

I'm comfortable with finding these files so I was able to find exactly what you stated.

Where do you recommend installing MUSH if not in the default location? Should I just put it directly on the root of my preferred storage?

Thanks.


Sorry, these questions are a bit off topic.. but they came from errors I'm getting within my debugging this plugin.
USA Global Moderator #45
Put it anywhere that isn't protected by the OS. Many people choose their desktop or documents folders. I make my installer default to the desktop for this reason.
Amended on Tue 01 Sep 2020 05:57 PM by Fiendish
#46
Alright, so fresh install in a nice non-windows protected area. State files are being created and I can delete them, etc.

mouse-wheel scrolling... :( I am at a loss to why it does not work.

It works in AardMUSH, but not in regular mushclient. Is there a plugin I am not using correctly or a file I am missing? I feel that I have traced it all down to the right ones.

Ref: https://github.com/DBNU-Braska/DBNU
USA Global Moderator #47
You have to use https://github.com/nickgammon/mushclient/releases/tag/latest_commit

Released versions of MUSHclient don't send high order bits to the wheel handler callback.
Amended on Fri 04 Sep 2020 02:11 PM by Fiendish
#48
Fiendish said:

You have to use https://github.com/nickgammon/mushclient/releases/tag/latest_commit

Released versions of MUSHclient don't send high order bits to the wheel handler callback.


Thank you!