ID:159057
 
I have two input boxes on my interface, I have one preset to the "say" command, but I was wondering how I would make my second input box have text at the beginning of it that doesn't do anything, such as a command prompt, like so:

_______________
| > |
_______________

Something like that, a ">" before the text you type, but it plays no effect in the command, just "for looks". Thanks!
I could be wrong, but I don't think you can do it and have something like that actually 'just for looks' - everything on the command line is interpreted as part of a command.
Rather, how this can be accomplished is by everything being taken as the command, and you work with it as is, perhaps stripping the beginning if needed (which I think will only be really needed if you're using client/Command()). Not really tough.
One method to do this is have a verb named ">", with one argument that is set to take text and be optional (it needs to be optional so DS knows it "> " alone is a valid command, and so it won't prompt for text if it's entered). This way when a player sends a command that begins with "> ", everything after it is sent to the verb as an argument. You could it with this verb:
client/verb/Cmd(a as null|text)
set name = ">"
set hidden = 1
src << "The command you typed was: ([a])"

I think you may know this part, but the part to actually have "> " appear by default in the command line is done with a special syntax in the input control's command parameter (it can also be done with the client.command_text var, but that is old and deprecated). Set it (using winset()) to the default command you want to use, but with "!" in the beginning. Also, because of the symbols involved, you'll need to encase the parameter value in quotes (either single or double, but not mixed; single quotes are easier). So if you want the input control's default command to be > with a space after it, you'll set command to:
'> '

Including the quotes, for this case. The actual value of the parameter will be quote-less in the end, of course.
If needed, look up the command parameter in the Skin Reference for more info, and winset() in the DM Reference.
In response to Kaioken
I'll read up on winset().

Thanks!