Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Oozenthor
Beginner


Joined: 31 Jul 2006
Posts: 18

PostPosted: Sun May 06, 2007 1:05 am   

MXP Oddities
 
I have a few questions about using mxp, specifically the #MXP command.
Consider some mxp test code I wrote:
Code:
$mxpcolors="black|blue|cyan|green|magenta|orange|red|white|yellow|sandybrown|darkslateblue"
#CLR
#MXP <p><h1>h1</h1><h2>h2</h2><h3>h3</h3><h4>h4</h4><h5>h5</h5><h6>h6</h6><small>small</small></p>
#MXP <br><br>
#MXP <hr>
#MXP <font 'Times New Roman'>Times New Roman Font</font>
#MXP <tt>Non-proportional Font</tt>
#MXP <pre>pre</pre>
#MXP <sbr>sbr</sbr>
#MXP <send 'command' 'command popup'>command</send> <nobr>
#MXP <send 'menu1|menu2|menu3' 'menu popup 1|menu popup 2|menu popup 3'>menu</send> <nobr>
#MXP <a 'http://www.zuggsoft.com/zmud/mxp.htm' 'hyperlink popup'>hyperlink</a>
#MXP <image zsnew2.gif URL='http://www.zuggsoft.com/common/'>
#MXP <ul><li>ulist1</li><li>ulist2</li></ul>
#MXP <ol><nobr>
#FORALL $mxpcolors {#MXP <li><c %i><b>bold</b> normal <h>high</h> <i>itallic</i> <s>strike</s> <u>underline</u> -> %i</c></li><nobr>}
#MXP </ol>


My questions are:
1). Is only one <br> allowed? The first breaks as expected, but the second is displayed.
2). <hr> Tag. I saw it documented (optional tags) but it is not defined as an element. Intentional?
3). <pre> Tag. It's defined but I can't find documentation for it. What does it do? Didn't seem to do much here.
4). <send> menus. Using the hint="hint text" syntax from the documentation didn't work, but just 'hint text' did. Is it just me?
5). <h>, the 'high' tag. It only works on some colors, the oddest was turning black into white for me.

Documentation is from www.zuggsoft.com/zmud/mxp.htm

Thanks
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun May 06, 2007 4:46 am   
 
#1 I'm not sure about. I notice the same thing, so I assume it's related to open/secure stuff that I'm both not as familiar with and which I generally don't have to worry about (as I don't play on an MXP-enabled mud.)

#2 is probably intentional, at least for the moment if not for all time. The MXP support in ZMud was basically taken straight from ZMud, without very many modifications and upgrades. Most of it predates any work Zugg put into inline images, but I'm not sure if he can or plans to upgrade MXP to allow for the same (ie, <HR> and inline <img> stuff). It's probably related to the fact that Zugg's been chronically optimizing his product for text scrolling rather than graphics.

#3 I'm not sure if it actually works, but it's generally a tag to preserve user-written formatting. Kinda like [code] tags on the forums.

#4 seems like it's just you. Of course, it's much easier just to leave off the arg names...

#5 is due to a bug. If it's fixed, the version it's fixed in isn't released yet.
_________________
EDIT: I didn't like my old signature
Reply with quote
Oozenthor
Beginner


Joined: 31 Jul 2006
Posts: 18

PostPosted: Sun May 06, 2007 5:34 am   
 
Figured out what was going on with the <send>, both of these work:

#MXP <send "command" hint~="command popup">command</send> <nobr>

#MXP {<send "command" hint="command popup">command</send> <nobr>}

Just the equals sign getting mangled but you are right, it is easier to leave off arg names.

Thanks for the feedback.

By the way are there any plans to highlight mxp tags in the syntax editor?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon May 07, 2007 5:33 pm   
 
No plans to highlight MXP tags since MXP tags are not a normal part of most CMUD scripting.

#1: The #MXP command sends the line to the screen in MXP "secure" mode. When you send a
, it starts a new line and the new line is now in Open mode, so that's why it doesn't get recognized. Since you can display blank lines just using the #CR command, you don't need to use the #MXP command to do this. Or, you can put a %e[1z sequence to switch back to Secure mode on the second line.

#2: The HR tag currently isn't implemented. But you could use the IMG tag to display a line graphic if you wanted

#3: Should be the same as the TT tag. It selects a non-proportional font to preserve user formatting.

#4: Regarding your second post: You should always put {} around your entire MXP string when using the #MXP command for it to parse correctly.

#5: Yes, as Matt mentioned, this bug should be fixed in this week's release. (hopefully tonight)
Reply with quote
Oozenthor
Beginner


Joined: 31 Jul 2006
Posts: 18

PostPosted: Thu May 10, 2007 11:26 pm   
 
I reworte my test code to:
Code:
$mxpcolors="black|blue|cyan|green|magenta|orange|white|yellow|sandybrown|darkslateblue"
#CLR
#MXP {<p><h1>h1</h1><h2>h2</h2><h3>h3</h3><h4>h4</h4><h5>h5</h5><h6>h6</h6><small>small</small></p>}
#MXP {<br>}
#MXP {<font 'Times New Roman'>Times New Roman Font</font>}
#MXP {<tt>Non-proportional Font</tt>}
#MXP {<pre>preserve user formating</pre>}
#MXP {<sbr>soft page break}
#MXP {<send "command" hint="command popup">command</send> <nobr>}
#MXP {<send "menu1|menu2|menu3" hint="menu popup 1|menu popup 2|menu popup 3">menu</send> <nobr>}
#MXP {<a href="http://www.zuggsoft.com/zmud/mxp.htm" hint="hyperlink popup">hyperlink</a>}
#MXP {<image zsnew2.gif URL="http://www.zuggsoft.com/common/">}
#MXP {<ul><li>ulist1</li><li>ulist2</li></ul>}
#MXP {<ol><nobr>}
#FORALL $mxpcolors {
 #MXP <li><c %i>normal <b>bold</b> <h>high</h> <i>itallic</i> <s>strike</s> <u>underline</u> : %i</c></li><nobr>
}
#MXP {</ol>}

The colour bugfix is working great now.
My only issue is when I do want to expand things in a mxp comand, like in the #FORALL statement above. But if I escape special characters with "~" it is no real problem.

Thanks for the help Matt & Zugg
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Fri May 11, 2007 4:02 am   
 
The curly brace thing is a little odd too.
A very simple example.

#alias isHere {$text={A <send 'Greet %1|Kick %1|Punch %1' 'Greet|Kick|Punch'>%1</send> is here.};#mxp $text}

Note in this case I did NOT use the curly braces with the #MXP command. If you do so it fails.

Also, if you try this with a normal variable it will not work unless you use #execute {"#mxp "@text}
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net