This post documents the features added to MUSHclient over the years which do not have an equivalent checkbox or other method of setting them in the normal GUI interface. These options need to be set by scripting (once) and then saved by doing a normal world file save. You can then inspect them if required in the world file (eg. foo.mcl) using a normal text editor.
To set an option use SetOption (for numbers) or SetAlphaOption (for strings) by using the Immediate Window (Ctrl+I) or entering a script command in the command line with the scripting prefix (if set up). The examples are in Lua, but would be similar in other languages.
Remember to save the world file afterwards!
To check you got the spelling of the option name right, in Lua you can check the setting worked like this:
check (SetAlphaOption ("editor_window_name", "Crimson Editor")) -- worked OK, no error message
check (SetOption ("foo", 1)) --> Error: Option name not found
In other languages you can check that SetOption or SetAlphaOption return the number 0.
You can also view the current value of any option by using the "Get" function (GetOption or GetAlphaOption), like this:
print (GetAlphaOption ("editor_window_name")) --> Crimson Editor
Resizing the command window
- auto_resize_command_window
This lets you auto-resize your command window. If set, the command window resizes itself as you type to exactly hold the current contents, up to 20 lines of it (or some other limits as described below). For example, you start with a single line, as it fills up, the window expands to two lines, if you paste a few lines, it expands some more, if you delete some text, it contracts, and so on.
For example:
SetOption ("auto_resize_command_window", 1) -- activate it
SetOption ("auto_resize_command_window", 0) -- deactivate it
- auto_resize_minimum_lines
The minimum size of the command window, if auto-resizing is active. Range 1 to 100.
For example:
SetOption ("auto_resize_minimum_lines", 2) -- minimum two line (default 1)
- auto_resize_maximum_lines
The maximum size of the command window, if auto-resizing is active. Range 1 to 100.
For example:
SetOption ("auto_resize_maximum_lines", 30) -- maximum 30 lines (default 20)
Defaults for new aliases
- default_alias_send_to
The default location for the "send to" field when adding a new alias in the GUI interface.
For example:
SetOption ("default_alias_send_to", sendto.script)
- default_alias_sequence
The default sequence number when adding a new alias in the GUI interface.
For example:
SetOption ("default_alias_sequence", 50)
- default_alias_regexp
The default 'regular expression' flag when adding a new alias in the GUI interface.
For example:
SetOption ("default_alias_regexp", true)
- default_alias_expand_variables
The default 'expand variables' flag when adding a new alias in the GUI interface.
For example:
SetOption ("default_alias_expand_variables", true)
- default_alias_keep_evaluating
The default 'keep evaluating' flag when adding a new alias in the GUI interface.
For example:
SetOption ("default_alias_keep_evaluating", false)
- default_alias_ignore_case
The default 'ignore case' flag when adding a new alias in the GUI interface.
For example:
SetOption ("default_alias_ignore_case", true)
Defaults for new timers
- default_timer_send_to
The default location for the "send to" field when adding a new timer in the GUI interface.
For example:
SetOption ("default_timer_send_to", sendto.script)
Defaults for new triggers
- default_trigger_send_to
The default location for the "send to" field when adding a new trigger in the GUI interface.
For example:
SetOption ("default_trigger_send_to", sendto.script)
- default_trigger_sequence
The default sequence number when adding a new trigger in the GUI interface.
For example:
SetOption ("default_trigger_sequence", 50)
- default_trigger_regexp
The default 'regular expression' flag when adding a new trigger in the GUI interface.
For example:
SetOption ("default_trigger_regexp", true)
- default_trigger_expand_variables
The default 'expand variables' flag when adding a new trigger in the GUI interface.
For example:
SetOption ("default_trigger_expand_variables", true)
- default_trigger_keep_evaluating
The default 'keep evaluating' flag when adding a new trigger in the GUI interface.
For example:
SetOption ("default_trigger_keep_evaluating", false)
- default_trigger_ignore_case
The default 'ignore case' flag when adding a new trigger in the GUI interface.
For example:
SetOption ("default_trigger_ignore_case", true)
Editing text files
- editor_window_name
If specified, and you edit a script, plugin, or plugin state file with an external editor, MUSHclient will attempt to bring that window to the front.
This is to work around the annoying problem, that with some editors the editor opens the file, but stays deactivated.
For example:
SetAlphaOption ("editor_window_name", "Crimson Editor") -- bring to front
SetAlphaOption ("editor_window_name", "") -- deactivate option
- script_editor_argument
This lets you specify how the external script editor is to open a script file. The string %file is replaced by the name of the file to be edited.
For example:
SetAlphaOption ("script_editor_argument", "/edit '%file'")
SetAlphaOption ("script_editor_argument", "") -- use default (quoted file name)
Miscellaneous
- ctrl_backspace_deletes_last_word
This sets an option so that hitting Ctrl+Backspace has the behaviour of deleting the last word in the command window (to the left of the cursor that is). If something is already selected however then only that thing is deleted.
For example:
SetOption ("ctrl_backspace_deletes_last_word", 1) -- activate it
SetOption ("ctrl_backspace_deletes_last_word", 0) -- deactivate it
- do_not_add_macros_to_command_history
This sets an option so that hitting a macro does not make it appear in command history. For example if you have F2 set up to "bash" and F3 to "kick" and then type "kill kobold", and jab away at F2 and F3 until the kobold is dead, you really only want to have "kill kobold" sitting in the command history, especially if you have to kill another one immediately.
For example:
SetOption ("do_not_add_macros_to_command_history", 1) -- activate it
SetOption ("do_not_add_macros_to_command_history", 0) -- deactivate it
- do_not_show_outstanding_lines
If activated, does not show the count of newly received lines in the window tabs, if you are using tabbed windows.
SetOption ("do_not_show_outstanding_lines", 1) -- activate it
SetOption ("do_not_show_outstanding_lines", 0) -- deactivate it
- do_not_translate_iac_to_iac_iac
For MUDs which don't use telnet negotiation sequences, if you attempt to send the character 0xFF (IAC), they simply want to get 0xFF at the MUD, not 0xFF 0xFF. Setting this option achieves this. For most MUDs you should leave it at the default (0).
See http://www.gammon.com.au/forum/?id=8586 for a discussion.
SetOption ("do_not_translate_iac_to_iac_iac", 1) -- activate it
SetOption ("do_not_translate_iac_to_iac_iac", 0) -- deactivate it
- fade_output_buffer_after_seconds
Sets an option to, after the specified seconds, lines in the output buffer older than that will fade (over 8 seconds) to 20% opacity (those two figures can be controlled by other options, see below).
Example:
SetOption ("fade_output_buffer_after_seconds", 30) -- some figure in the range 0 to 3600
In this case, lines which arrived later than 30 seconds ago will dim (over 8 seconds) to 20% opacity. Scrolling backwards through the buffer (eg. with the scrollbar) will instantly restore the lines to full opacity, and the 30-second countdown will start again.
To disable this feature, set the number of seconds to zero:
SetOption ("fade_output_buffer_after_seconds", 0) -- deactivate this feature
- fade_output_opacity_percent
Sets the opacity to which older lines are faded (see "fade_output_buffer_after_seconds" above). If set to 0 then the lines will completely fade away. If you make it higher then the lines will just go dim.
SetOption ("fade_output_opacity_percent", 50) -- fade to 50% (range 0 to 100)
- fade_output_seconds
Sets the time in seconds over which older lines are faded (see "fade_output_buffer_after_seconds" above). A higher figure will make the lines fade more slowly, giving a visual impression of which lines are recent and which lines are older.
SetOption ("fade_output_seconds", 12) -- fade over 12 seconds (range 1 to 60)
- log_script_errors
An option to log Lua scripting errors to a log file.
This is intended for sending to plugin developers or for your own use if you are developing scripts or plugins, and an error message disappears before you can attend to it.
The file will be called "script_error_log.txt" in the default log file directory. The default log file directory is the one reported by:
GetInfo (58)
SetOption ("log_script_errors", 1) -- activate it
SetOption ("log_script_errors", 0) -- deactivate it
- omit_date_from_save_files
Option to omit the date from "world" files when saving them.
The purpose of this is to allow you to use Git (or some other source-control system) to monitor changes to your world files, without "spurious" differences appearing, that is, that only the date has changed.
SetOption ("omit_date_from_save_files", 1) -- activate it
SetOption ("omit_date_from_save_files", 0) -- deactivate it
- play_sounds_in_background
If set, the PlaySound function uses a global sound buffer, which means that sounds will continue to play, even if MUSHclient does not have the focus.
SetOption ("play_sounds_in_background", 1) -- activate it
SetOption ("play_sounds_in_background", 0) -- deactivate it
- send_keep_alives
This will cause the connection to the MUD to have the "keep_alive" option set, which will hopefully stop you being disconnected for inactivity by some routers.
You need to set the option before connecting to the MUD for it to take effect.
The keep-alive is sent every 2 minutes.
For example:
SetOption ("send_keep_alives", 1) -- activate option
SetOption ("send_keep_alives", 0) -- deactivate option
- tool_tip_start_time
This controls the number of milliseconds that elapse before a tooltip is shown when you hover over a line in the output window, or a hotspot (which has a tooltip) in a miniwindow. There are 1000 milliseconds per second. If you specify 0 you get the system default.
For example:
SetOption ("tool_tip_start_time", 500) -- show tooltip after 1/2 a second
SetOption ("tool_tip_start_time", 10) -- show tooltip after 1/10 of a second
- tool_tip_visible_time
This controls the number of milliseconds that elapse after tooltip is shown before it is automatically removed (it will be removed anyway if you move the mouse away). There are 1000 milliseconds per second. If you specify 0 you get the system default.
For example:
SetOption ("tool_tip_visible_time", 5000) -- remove tooltip after 5 seconds
SetOption ("tool_tip_visible_time", 10000) -- remove tooltip after 10 seconds
The maximum time you can specify is 120000 (two minutes).
|