Script routine - utils.inputbox

Posted by Nick Gammon on Mon 28 Nov 2005 04:36 AM — 1 posts, 8,309 views.

Australia Forum Administrator #0

Version 3.70 of MUSHclient has a new Lua script function: utils.inputbox

This lets you display a Windows message box and accept a free-format reply (very similar to InputBox in VBscript). The intention is to allow you to display (in a small dialog box) a question and accept a typed response.

The calling sequence is:


result = utils.inputbox ( msg, title, default )

The only required argument is the message text itself.

  1. msg = message to display (max 1000 characters)
  2. title = title of box - if nil, defaults to "MUSHclient" (max 100 characters)
  3. default = default text - defaults to no text

Return value = what they typed, or nil if cancelled

Example:


print (utils.inputbox ("What is your name?", "Query", "Nick")) --> Peter

inputbox example - 2K