showPrompt()

Post Reply
User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

showPrompt()

Post by Vadi »

I'm wondering if anyone has any neat ideas on how to implement the mudbot-like showPrompt() in Mudlet. This is useful if you're displaying an echo and want to have it end with a fake prompt, instead of leaving it hanging on a blank line (until you get output from the mud).

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: showPrompt()

Post by Iocun »

Well, I guess the simplest version would be either to do a send("") to force the mud to send a prompt (I'm not sure whether that will work with all muds though), or to simply capture the prompt with a trigger into a variable and echo it (with colours, if necessary).

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: showPrompt()

Post by Vadi »

Oh yeah, I was meaning about the capture solution, so it's instant (and doesn't mess anything up, I think a blank send can interrupt some things :| ).

Capturing the prompt itself I suppose isn't much of a problem, but keeping it colored is. Hm.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: showPrompt()

Post by Heiko »

no problem: create a non-window buffer and copy + paste like usual (createBuffer() )

Post Reply