Having issues with mxp in gmcp
Posted: Tue Oct 01, 2019 7:05 pm
I'm trying to move map data from gmcp into a separate window.. But as I understand it the only way to do that is to use ansi2decho and convert the escape codes before decho-ing into that new window? And that doesn't touch the mxp code.. Trying to filter out the mxp code, store where the clickable links are supposed to be, go back through the buffer to those stored locations and apply a clickable link to that character is proving to be a nightmare for me. Essentially my question is, is there any way to get the functionality of paste() via raw data in gmcp?
Here's a sample of that raw data:
Namely the issue is the part. Replacing that line with just the @ between the mxp tags, and then applying setLink to it seems like overkill. Is there no way to print into another buffer while keeping all this data directly from gmcp?
Here's the regex for capturing the mxp lines
Although I think the escape character is being stripped out here..
But it seems doable and there are probably easier ways than what I'm thinking right now, but seems like there should be a much much easier way to simply paste() this data in directly from gmcp and have the client parse it just like it parses everything else normally.. I feel like I'm missing something really simple.
Here's a sample of that raw data:
Code: Select all
" [39;49m[0m-[39;49m[0m[32m[4zMXP<send href="goto 3b"MXP>$[4zMXP</sendMXP>[39;49m[0m-[39;49m[0m
[39;49m[0m|[39;49m[0m [39;49m[0m|[39;49m[0m
[39;49m[0m[31m+[39;49m[0m[1;33m[4zMXP<send href="goto 3c"MXP>@[4zMXP</sendMXP>[39;49m[0m-
[39;49m[0m[32m[4zMXP<send href="goto 4c"MXP>$[4zMXP</sendMXP>[39;49m[0m
[39;49m[0m[31m+[39;49m[0m [39;49m[0m[31m+[39;49m[0m\[39;49m[0m
[39;49m[0m[36m[4zMXP<send href="goto 5d"MXP>*[4zMXP</sendMXP>[39;49m[0m
"
Code: Select all
[4zMXP<send href="goto 3c"MXP>@[4zMXP</sendMXP>
Here's the regex for capturing the mxp lines
Code: Select all
"%[4zMXP\<send href=\"goto .+\"MXP>.%[4zMXP\</sendMXP\>"
But it seems doable and there are probably easier ways than what I'm thinking right now, but seems like there should be a much much easier way to simply paste() this data in directly from gmcp and have the client parse it just like it parses everything else normally.. I feel like I'm missing something really simple.