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

 Related 
Contents
Create/Modify Setting Items
  #ALIAS
  #CLASS
  #DIRECTION
  #EDITOR
  #GAUGE
  #KEY
  #MENU
  #MODULE
  #NOSAVE
  #RENAME
  #STATUS
  #STWIN
  #T+
  #T-
  #TAB
  Create/Modify Settings
Command Reference
  #nnn
  #ABORT
  #ACTION
  #ADD
  #ADDITEM
  #ADDKEY
  #AFK
  #ALARM
  #ALIAS
  #ALL
  #BACKUP
  #BEEP
  #BREAK
  #BUTTON
  #C-
  #C+
  #CALL
  #CAPTURE
  #CASE
  #CHARACTER
  #CLASS
  #CLOSE
  #CLR
  #CMD
  #COLOR
  #COM
  #CONDITION
  #CONFIGURE
  #CONNECT
  #CONTINUE
  #CR
  #CW
  #DBCLOSE
  #DBDELETE
  #DBFIRST
  #DBGET
  #DBLOAD
  #DBNEXT
  #DBOFFLINE
  #DBONLINE
  #DBPREV
  #DBPUT
  #DBRESET
  #DBSAVE
  #DDE
  #DEBUG
  #DEBUGFILE
  #DEFAULT
  #DELCLASS
  #DELITEM
  #DELKEY
  #DELNITEM
  #DESCRIBE
  #DIRECTION
  #DISCONNECT
  #DOOR
  #ECHO
  #ECHOPROMPT
  #EDITOR
  #ERASE
  #EVALUATE
  #EVENT
  #EXECUTE
  #EXECWIN
  #EXIT
  #FILE
  #FIND
  #FIRE
  #FORALL
  #FREEZE
  #FTP
  #FUNCTION
  #GAG
  #GAGBLOCK
  #GAGLOG
  #GAGOFF
  #GAGON
  #GAGSPACE
  #GAUGE
  #H-
  #H+
  #HELP
  #HIGHLIGHT
  #HISTLOAD
  #HISTORY
  #HISTSAVE
  #HOST
  #IF
  #IGNORE
  #IMAGE
  #INPUT
  #KEY
  #KILLALL
  #LAUNCH
  #LMAP
  #LOAD
  #LOCAL
  #LOCATION
  #LOG
  #LOOK
  #LOOP
  #LOOPDB
  #LOOPVIEW
  #LUA
  #MAKEROOM
  #MAKEWINDOW
  #MAP
  #MAPQUERY
  #MARK
  #MATH
  #MEDIA
  #MENU
  #MERGE
  #MESSAGE
  #MODULE
  #MOVE
  #MSS
  #MXP
  #MXPTRIG
  #NAME
  #NEW
  #NEWVAR
  #NODEF
  #NODIR
  #NOINPUT
  #NOMAP
  #NOOP
  #NOSAVE
  #OK
  #ONINPUT
  #PATH
  #PATHHIGH
  #PAUSE
  #PCOL
  #PICK
  #PLAY
  #PLUGIN
  #PORTAL
  #PRINT
  #PROMPT
  #PSUB
  #PUEBLO
  #PW
  #QUERY
  #QUEUE
  #RAISEEVENT
  #READ
  #RECALL
  #RECORD
  #REGEX
  #RENAME
  #REPEAT
  #RESET
  #RESUME
  #RESULT
  #RETRACE
  #RETURN
  #SAVE
  #SAY
  #SAYADD
  #SAYPROMPT
  #SCRIPT
  #SCROLL
  #SECTION
  #SEND
  #SENDGMCP
  #SENDPROMPT
  #SENDRAW
  #SENDSB
  #SESSION
  #SET
  #SETPROMPT
  #SHOW
  #SHOWARR
  #SHOWDB
  #SHOWPROMPT
  #SHOWTABLE
  #SIGNAL
  #SLOW
  #SORT
  #SQLCLOSE
  #SQLDB
  #SS
  #STATE
  #STATUS
  #STEP
  #STOP
  #STWIN
  #STYLE
  #SUBSTITUTE
  #SUSPEND
  #SWITCH
  #T-
  #T?
  #T+
  #TAB
  #TAG
  #TELEPORT
  #TEMP
  #TEMPVAR
  #THREAD
  #TIMER
  #TRACK
  #TRIGGER
  #TSET
  #TYPE
  #TZERO
  #UNALIAS
  #UNBUTTON
  #UNCLASS
  #UNDIR
  #UNGAG
  #UNKEY
  #UNEVENT
  #UNLOAD
  #UNLOC
  #UNMENU
  #UNPATH
  #UNPORTAL
  #UNSTYLE
  #UNTAB
  #UNTIL
  #UNTRIGGER
  #UNVAR
  #UPDATE
  #URL
  #VARFUNC
  #VARIABLE
  #VERBATIM
  #VERSION
  #VIEW
  #WAIT
  #WAITFOR
  #WAITSIGNAL
  #WAITTHREAD
  #WALK
  #WHILE
  #WINDOW
  #WITHLOC
  #WIZLIST
  #WRAP
  #WRITE
  #WRITELOG
  #YESNO
Related Links:
  %btncol
  %btnimage
  Create/Modify Settings
  Terminology
  Buttons
  Room Scripts
#BUTTON [[cmud_#BU]] 
BUTTON

Syntax: #BU id|number caption {commands}

Triggers the named or numbered button. This is typically assigned to a macro key. The number parameter can be a variable reference, but must evaluate to a numeric value. Instead of referring to a button by it's numeric position on the button bar, you can also refer to buttons by their ID name.

This command can also be used to define a button. This syntax is used by the ascii export and import scripting routines. If the number is zero, it refers to a button just past the last button, which is useful for appending a new button to the list. The syntax is:

#BUTTON id|number Off-caption On-command On-caption Off-command Value-expression Variable-name Bitmap-filename AutoSize Width Height AutoPos Top Left Off-color On-color Button-Kind Bitmap-margin Classname Options ToolTip ID PanelNum

For multi-state buttons On-caption, Off-command, and On-color can be string lists to represent the different states of the button.

BUTTON example

#BU 1
triggers the first button, just as if you had clicked it.

#BU test {Test Button} {look}
creates a new button, with an ID of "test", that sends the look command to the MUD when it is clicked

Description of all arguments

Here is description of each argument used in the full button creation command (used in Export and Import)

id|number
The numeric position of the button on the button bar, or the ID name of the button to modify

Off-caption
The text displayed on the button when it is off. For a multi-state button, this is the master caption for the button. This argument is subject to expansion, use quotes instead of braces if variable or function references are used.

On-command
The command to be executed when the button is clicked (when the button state changes to "on"). For a Menu button, this is the name of the menu class.

On-caption
For a toggle button, this text is displayed on the button when the button is pushed in (on). To create a multi-state button, use a string list to define the caption for each button state.

Off-command
For a toggle button, this command is executed when the button state changes to "off" (button clicked when it is down). For a multi-state button, this is a string list of commands corresponding to each button state.

Value-expression
This is the expression used to determine the button state. 0 is off, 1 is on. For multistate buttons, this numeric expression sets the button state. This allows the button state to be controlled from a script. For gauge buttons, this expression controls the value of the gauge.

Variable-name
The name of a variable to contain the state of the button. Whenever the button changes state, the current value of the button is written to this variable. Also, if this variable changes value in a script, the button state will change to reflect the new variable value.

Bitmap-filename
The name of the BMP image to display on the button. Instead of a BMP filename, this can also be the name of an internal resource bitmap.

AutoSize
If it is blank, then the AutoSize option is selected, and the values of the next two arguments are ignored.

Width
The width of the button in pixels. Only used if the AutoSize option is not selected.

Height
The height of the button in pixels. Only used if the AutoSize option is not selected.

AutoPos
If blank, then the AutoPosition option is selected, and the values of the next two arguments are ignored

Top
The top of the button in pixels. Only used if the AutoPos option is not selected.

Left
The left edge of the button in pixels. Only used if the AutoPos option is not selected.

Off-color
The color of the button when it is in the Off state. Also, the background color of a gauge button.

On-color
The color of the button when it is in the On state. For multistate buttons, this should be a string list of colors for each button state.

Button-kind
For separator buttons, this has the value of "Separ". For Menu buttons, this has the value of "Menu". For Gauge buttons, this argument is a string list. The first value of the string list is "Gauge". The second value of the string list is the Gauge normal color, the third value is the gauge low color, the 4th value is the GaugeMax expression, the 5th value is the GaugeLow expression..

Bitmap-margin
Indicates the spacing between the bitmap icon and the text caption. -1 is the default. Other negative values can be used to control the absolute position of the button on the button bar. If the bitmap is on top, the top position of the button is -(Margin+2). If the bitmap is on the left, the left position of the button is -(Margin+2).

Classname
The name of the class to assign this button to.

Options
A string list of various options. Value option values are: "explore" to set the explorer-style buttons, "inset" to draw an inset rectangle around the button, "stack" to stack this button with the previous one, "top" to display the icon on the top instead of to the left of the caption, "right" to set the button to be right-aligned.

Tooltip
The help tip displayed when the mouse hovers over the button.

ID
The ID name for the button

PanelNum
The panel number to display this button in. Value can be from 1 to 4. If omitted, the default value of 1 is used.

 User comments 
Mixsel: Sun Jan 23, 2011 6:04 pm    

Any chance we could get a Full blown example? with both command line version and editor version? I know command line isn't recommended. so a editor version would be nice. :)

Thanks
Viewer Comments [1 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net