Simulate & MXP

Posted by Beale on Wed 02 May 2007 09:57 AM — 3 posts, 15,967 views.

#0
Okay, this seemed like the best place for this little question.

Essentially, I have an Element specification, which replaces one sent by the MUD. I can see it works, because I can insert it with the Test Trigger window. However! I am now trying to automate the process, using the Simulate function, and it seems that it cannot simulate the \1B[4z code (the MXP secure-once code).

It needs the MXP Secure mode because element specifications in open mode aren't acceptable, but I don't seem to be able to begin secure mode using the function.

Any clues?

Oh, and the line, just for reference, is:

\1B[4z<!ELEMENT invobjectpopup '<send href="look &text;|frimble &text;|juggle &text;|drop &text;|read &text;|condition &text;" PROMPT hint="Right click for menu">&text;</send> '>

It's supposed to allow the simple creation of right click menus for objects.

And the Simulate line is currently:

Simulate("\1B[4z<!ELEMENT invobjectpopup '<send href=\"look &text;|frimble &text;|juggle &text;|drop &text;|read &text;|condition &text;\" PROMPT hint=\"Right click for menu\">&text;</send> '>")


Which produces: (a little character that breaks the webform but looks something like an upside-down L)B[4z
and the error saying that the MXP definition is ignored due to not being in secure mode.

Admittedly, I can see that having Simulate able to enter secure mode might have slight security concerns, but is it possible? Or can I simulate the received data somehow else?
Amended on Wed 02 May 2007 10:00 AM by Beale
Australia Forum Administrator #1
What language are you using? If it is Lua, you can't use \1B to insert an escape.
#2
Aha! Yes, I used string.char(27) instead, and it seems to work.

Thank you for the help.