[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Summary of options not supported in the GUI interface

Summary of options not supported in the GUI interface

This subject is now closed.     [Refresh] Refresh page


Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Fri 16 Jul 2010 09:27 PM (UTC)

Amended on Wed 28 Feb 2018 07:13 AM (UTC) by Nick Gammon

Message
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).


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 17 Jul 2010 03:32 AM (UTC)

Amended on Mon 26 Feb 2018 10:55 PM (UTC) by Nick Gammon

Message
The following were added in version 4.54:


  • default_trigger_send_to
  • default_trigger_sequence
  • default_trigger_regexp
  • default_trigger_expand_variables
  • default_trigger_keep_evaluating
  • default_trigger_ignore_case

  • default_alias_send_to
  • default_alias_sequence
  • default_alias_regexp
  • default_alias_expand_variables
  • default_alias_keep_evaluating
  • default_alias_ignore_case

  • default_timer_send_to


The following was added in version 4.56:


  • play_sounds_in_background



The following were added in version 4.83:


  • tool_tip_start_time
  • tool_tip_visible_time


The following were added in version 4.92:


  • log_script_errors


The following were added in version 5.06:


  • ctrl_backspace_deletes_last_word
  • fade_output_buffer_after_seconds
  • fade_output_opacity_percent
  • fade_output_seconds

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sat 17 Jul 2010 05:42 AM (UTC)
Message
In version 4.53 onwards you can use true or false in Lua, instead of 1 or 0. If you are using an earlier version you must use the numbers 1 for true, and 0 for false, for boolean-type options.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (23,016 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Mon 09 Aug 2010 12:38 AM (UTC)

Amended on Wed 11 Aug 2010 11:05 AM (UTC) by Nick Gammon

Message
There is now a plugin (see below) that lets you change these options via a GUI interface ...

Template:post=10483 Please see the forum thread: http://gammon.com.au/forum/?id=10483.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,894 views.

This subject is now closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]