Class EMCO

Embeddable Multi Console Object.

This is essentially YATCO, but with some tweaks, updates, and it returns an object similar to Geyser so that you can a.) have multiple of them and b.) easily embed it into your existing UI as you would any other Geyser element.

Info:

  • Copyright: 2020 Damian Monogue,2021 Damian Monogue
  • License: MIT, see LICENSE.lua
  • Author: Damian Monogue

Methods

emco:new(cons, container) Creates a new Embeddable Multi Console Object.
emco:miniConvertYATCO() Scans for the old YATCO configuration values and prints out a set of constraints to use.
emco:convertYATCO() Echos to the main console a script object you can add which will fully convert YATCO to EMCO.
emco:display(tabName, tabName, item[, any]) Display the contents of one or more variables to an EMCO tab.
emco:removeTab(tabName) Remove a tab from the EMCO
emco:addTab(tabName[, position]) Adds a tab to the EMCO object
emco:switchTab(tabName) Switches the active, visible tab of the EMCO to tabName
emco:cycleTab(reverse) Cycles between the tabs in order
emco:setBufferSize(bufferSize, deleteLines) Sets the buffer size and number of lines to delete for all managed miniconsoles.
emco:setBackgroundImage(tabName, imagePath, mode) Sets the background image for a tab's console.
emco:resetBackgroundImage(tabName) Resets the background image on a tab's console, returning it to the background color
emco:replay(tabName, numLines) Replays the last numLines lines from the log for tabName
emco:replayAll(numLines) Replays the last numLines in all miniconsoles
emco:processTemplate(str, tabName) Formats the string through EMCO's template.
emco:setPath(path) Sets the path for the EMCO for logging
emco:setFileName(fileName) Sets the fileName for the EMCO for logging
emco:setCmdLineStyleSheet(styleSheet) Sets the stylesheet for command lines in this EMCO
emco:enableCmdLine(tabName, template) Enables the commandLine on the specified tab.
emco:enableAllCmdLines() Enables all command lines, using whatever template they may currently have set
emco:disableAllCmdLines() Disables all commands line, but does not change their template
emco:disableCmdLine(tabName) Disables the command line for a particular tab
emco:setCmdAction(tabName, template) Sets the command action for a tab's command line.
emco:resetCmdAction(tabName) Resets the command action for tabName's miniconsole, which makes it work like the normal commandline
emco:getCmdLine(tabName) Gets the contents of tabName's cmdLine
emco:printCmd(tabName, txt) Prints to tabName's command line
emco:clearCmd(tabName) Clears tabName's command line
emco:appendCmd(tabName, txt) Appends text to tabName's command line
emco:reset() resets the object, redrawing everything
emco:fuzzyBoolean(bool) Expands boolean definitions to be more flexible.
emco:clear(tabName) clears a specific tab
emco:clearAll() clears all the tabs
emco:setTabFont(font) sets the font for all tabs
emco:setSingleTabFont(tabName, font) sets the font for a single tab.
emco:setFont(font) sets the font for all the miniconsoles
emco:setSingleWindowFont(tabName, font) sets the font for a specific miniconsole.
emco:setTabFontSize(fontSize) sets the font size for all tabs
emco:setTabAlignment(alignment) Sets the alignment for all the tabs
emco:enableTabUnderline() enables underline on all tabs
emco:disableTabUnderline() disables underline on all tabs
emco:enableTabItalics() enables italics on all tabs
emco:disableTabItalics() enables italics on all tabs
emco:enableTabBold() enables bold on all tabs
emco:disableTabBold() disables bold on all tabs
emco:enableCustomTimestampColor() enables custom colors for the timestamp, if displayed
emco:disableCustomTimestampColor() disables custom colors for the timestamp, if displayed
emco:enableTimestamp() enables the display of timestamps
emco:disableTimestamp() disables the display of timestamps
emco:setTimestampFormat(format) Sets the formatting for the timestamp, if enabled
emco:setTimestampBGColor(color) Sets the background color for the timestamp, if customTimestampColor is enabled.
emco:setTimestampFGColor(color) Sets the foreground color for the timestamp, if customTimestampColor is enabled.
emco:setAllTabName(allTabName) Sets the 'all' tab name.
emco:enableAllTab() Enables use of the 'all' tab
emco:disableAllTab() Disables use of the 'all' tab
emco:enableMapTab() Enables tying the Mudlet Mapper to one of the tabs.
emco:disableMapTab() disables binding the Mudlet Mapper to one of the tabs.
emco:setMapTabName(mapTabName) sets the name of the tab to bind the Mudlet Map.
emco:enableBlinkFromAll() Enables tab blinking even if you're on the 'all' tab
emco:disableBlinkFromAll() Disables tab blinking when you're on the 'all' tab
emco:enableGag() Enables gagging of the line passed in to :append(tabName)
emco:disableGag() Disables gagging of the line passed in to :append(tabName)
emco:enableBlink() Enables tab blinking when new information comes in to an inactive tab
emco:disableBlink() Disables tab blinking when new information comes in to an inactive tab
emco:enablePreserveBackground() Enables preserving the chat's background over the background of an incoming :append()
emco:disablePreserveBackground() Enables preserving the chat's background over the background of an incoming :append()
emco:setBlinkTime(blinkTime) Sets how long in seconds to wait between blinks
emco:setFontSize(fontSize) Sets the font size of the attached consoles
emco:setInactiveTabCSS(stylesheet) Sets the inactiveTabCSS
emco:setActiveTabCSS(stylesheet) Sets the activeTabCSS
emco:setActiveTabFGColor(color) Sets the FG color for the active tab
emco:setInactiveTabFGColor(color) Sets the FG color for the inactive tab
emco:setActiveTabBGColor(color) Sets the BG color for the active tab.
emco:setInactiveTabBGColor(color) Sets the BG color for the inactive tab.
emco:setConsoleColor(color) Sets the BG color for the consoles attached to this object
emco:setTabBoxCSS(css) Sets the CSS to use for the tab box which contains the tabs for the object
emco:setTabBoxColor(color) Sets the color to use for the tab box background
emco:setConsoleContainerColor(color) Sets the color for the container which holds the consoles attached to this object.
emco:setConsoleContainerCSS(css) Sets the CSS to use for the container which holds the consoles attached to this object
emco:setGap(gap) Sets the amount of space to use between the tabs and the consoles
emco:setTabHeight(tabHeight) Sets the height of the tabs in pixels
emco:enableAutoWrap() Enables autowrap for the object, and by extension all attached consoles.
emco:disableAutoWrap() Disables autowrap for the object, and by extension all attached consoles.
emco:setWrap(wrapAt) Sets the number of characters to wordwrap the attached consoles at.
emco:append(tabName, excludeAll) Appends the current line from the MUD to a tab.
emco:addNotifyTab(tabName) Adds a tab to the list of tabs to send OS toast/popup notifications for
emco:removeNotifyTab(tabName) Removes a tab from the list of tabs to send OS toast/popup notifications for
emco:addGag(pattern) Adds a pattern to the gag list for the EMCO
emco:removeGag(pattern) Removes a pattern from the gag list for the EMCO
emco:matchesGag(str) Checks if a string matches any of the EMCO's gag patterns
emco:enableNotifyWithFocus() Enables sending OS notifications even if Mudlet has focus
emco:disableNotifyWithFocus() Disables sending OS notifications if Mudlet has focus
emco:cecho(tabName, message, excludeAll) cecho to a tab, maintaining functionality
emco:decho(tabName, message, excludeAll) decho to a tab, maintaining functionality
emco:hecho(tabName, message, excludeAll) hecho to a tab, maintaining functionality
emco:echo(tabName, message, excludeAll) echo to a tab, maintaining functionality
emco:cechoLink(tabName, text, command, hint, excludeAll) cechoLink to a tab
emco:dechoLink(tabName, text, command, hint, excludeAll) dechoLink to a tab
emco:hechoLink(tabName, text, command, hint, excludeAll) hechoLink to a tab
emco:echoLink(tabName, text, command, hint, useCurrentFormat, excludeAll) echoLink to a tab
emco:cechoPopup(tabName, text, commands, hints, excludeAll) cechoPopup to a tab
emco:dechoPopup(tabName, text, commands, hints, excludeAll) dechoPopup to a tab
emco:hechoPopup(tabName, text, commands, hints, excludeAll) hechoPopup to a tab
emco:echoPopup(tabName, text, commands, hints, useCurrentFormat, excludeAll) echoPopup to a tab
emco:addAllTabExclusion(tabName) adds a tab to the exclusion list for echoing to the allTab
emco:removeAllTabExclusion(tabName) removess a tab from the exclusion list for echoing to the allTab
emco:enableBlankLine() Enable placing a blank line between all messages.
emco:disableBlankLine() Enable placing a blank line between all messages.
emco:enableScrollbars() Enable scrollbars for the miniconsoles
emco:disableScrollbars() Disable scrollbars for the miniconsoles
emco:save() Save an EMCO's configuration for reloading later.
emco:load() Load and apply a saved config for this EMCO
emco:enableTabLogging(tabName) Enables logging for tabName
emco:disableTabLogging(tabName) Disables logging for tabName
emco:enableAllLogging() Enables logging on all EMCO managed consoles
emco:disableAllLogging() Disables logging on all EMCO managed consoles


Methods

emco:new(cons, container) line 367
Creates a new Embeddable Multi Console Object.
see https://github.com/demonnic/EMCO/wiki for information on valid constraints and defaults

Parameters:

  • cons table table of constraints which configures the EMCO.
    option name description default
    timestamp display timestamps on the miniconsoles? false
    blankLine put a blank line between appends/echos? false
    scrollbars enable scrollbars for the miniconsoles? false
    customTimestampColor if showing timestamps, use a custom color? false
    mapTab should we attach the Mudlet Mapper to this EMCO? false
    mapTabName Which tab should we attach the map to?
    If mapTab is true and you do not set this, it will throw an error
    blinkFromAll should tabs still blink, even if you're on the 'all' tab? false
    preserveBackground preserve the miniconsole background color during append()? false
    gag when running :append(), should we also gag the line? false
    timestampFormat Format string for the timestamp. Uses getTime() "HH:mm:ss"
    timestampBGColor Custom BG color to use for timestamps. Any valid Geyser.Color works. "blue"
    timestampFGColor Custom FG color to use for timestamps. Any valid Geyser.Color works "red"
    allTab Should we send everything to an 'all' tab? false
    allTabName And which tab should we use for the 'all' tab? "All"
    blink Should we blink tabs that have been written to since you looked at them? false
    blinkTime How long to wait between blinks, in seconds? 3
    fontSize What font size to use for the miniconsoles? 9
    font What font to use for the miniconsoles?
    tabFont What font to use for the tabs?
    activeTabCss What css to use for the active tab? ""
    inactiveTabCSS What css to use for the inactive tabs? ""
    activeTabFGColor What color to use for the text on the active tab. Any Geyser.Color works. "purple"
    inactiveTabFGColor What color to use for the text on the inactive tabs. Any Geyser.Color works. "white"
    activeTabBGColor What BG color to use for the active tab? Any Geyser.Color works. Overriden by activeTabCSS "<0,180,0>"
    inactiveTabBGColor What BG color to use for the inactavie tabs? Any Geyser.Color works. Overridden by inactiveTabCSS "<60,60,60>"
    consoleColor Default background color for the miniconsoles. Any Geyser.Color works "black"
    tabBoxCSS tss for the entire tabBox (not individual tabs) ""
    tabBoxColor What color to use for the tabBox? Any Geyser.Color works. Overridden by tabBoxCSS "black"
    consoleContainerCSS CSS to use for the container holding the miniconsoles ""
    consoleContainerColor Color to use for the container holding the miniconsole. Any Geyser.Color works. Overridden by consoleContainerCSS "black"
    gap How many pixels to place between the tabs and the miniconsoles? 1
    consoles List of the tabs for this EMCO in table format { "All" }
    allTabExclusions List of the tabs which should never echo to the 'all' tab in table format {}
    tabHeight How many pixels high should the tabs be? 25
    autoWrap Use autoWrap for the miniconsoles? true
    wrapAt How many characters to wrap it, if autoWrap is turned off? 300
    leftMargin Number of pixels to put between the left edge of the EMCO and the miniconsole? 0
    rightMargin Number of pixels to put between the right edge of the EMCO and the miniconsole? 0
    bottomMargin Number of pixels to put between the bottom edge of the EMCO and the miniconsole? 0
    topMargin Number of pixels to put between the top edge of the miniconsole container, and the miniconsole? This is in addition to gap 0
    timestampExceptions Table of tabnames which should not get timestamps even if timestamps are turned on {}
    tabFontSize Font size for the tabs 8
    tabBold Should the tab text be bold? Boolean value false
    tabItalics Should the tab text be italicized? false
    tabUnderline Should the tab text be underlined? false
    tabAlignment Valid alignments are 'c', 'center', 'l', 'left', 'r', 'right', or '' to not include the alignment as part of the echo (to allow the stylesheet to handle it) 'c'
    commandLine Should we enable commandlines for the miniconsoles? false
    cmdActions A table with console names as keys, and values which are templates for the command to send. see the setCustomCommandline function for more {}
    cmdLineStyleSheet What stylesheet to use for the command lines. "QPlainTextEdit {\n border: 1px solid grey;\n }\n"
    backgroundImages A table containing definitions for the background images. Each entry should have a key the same name as the tab it applies to, with entries "image" which is the path to the image file,
    and "mode" which determines how it is displayed. "border" stretches, "center" center, "tile" tiles, and "style". See Mudletwikilink for details.
    {}
    bufferSize Number of lines of scrollback to keep for the miniconsoles 100000
    deleteLines Number of lines to delete if a console's buffer fills up. 1000
    gags A table of Lua patterns you wish to gag from being added to the EMCO. Useful for removing mob says and such example: {[[^A green leprechaun says, ".*"$]], "^Bob The Dark Lord of the Keep mutters darkly to himself.$"} see this tutorial on Lua patterns for more information. {}
    notifyTabs Tables containing the names of all tabs you want to send notifications. IE {"Says", "Tells", "Org"} {}
    notifyWithFocus If true, EMCO will send notifications even if Mudlet has focus. If false, it will only send them when Mudlet does NOT have focus. false
  • container GeyserObject The container to use as the parent for the EMCO

Returns:

    the newly created EMCO
emco:miniConvertYATCO() line 554
Scans for the old YATCO configuration values and prints out a set of constraints to use. with EMCO to achieve the same effect. Is just the invocation
emco:convertYATCO() line 565
Echos to the main console a script object you can add which will fully convert YATCO to EMCO. This replaces the demonnic.chat variable with a newly created EMCO object, so that the main functions used to place information on the consoles (append(), cecho(), etc) should continue to work in the user's triggers and events.
emco:display(tabName, tabName, item[, any]) line 611
Display the contents of one or more variables to an EMCO tab. like display() but targets the miniconsole

Parameters:

  • tabName string the tab to displayu to
  • tabName string the tab to displayu to
  • item any The thing to display()
  • any item2 another thing to display() (optional)
emco:removeTab(tabName) line 621
Remove a tab from the EMCO

Parameters:

  • tabName string the name of the tab you want to remove from the EMCO
emco:addTab(tabName[, position]) line 648
Adds a tab to the EMCO object

Parameters:

  • tabName string the name of the tab to add
  • position number position in the tab switcher to put this tab (optional)
emco:switchTab(tabName) line 669
Switches the active, visible tab of the EMCO to tabName

Parameters:

  • tabName string the name of the tab to show
emco:cycleTab(reverse) line 697
Cycles between the tabs in order

Parameters:

  • reverse boolean Defaults to false. When true, moves backward through the tab list rather than forward.
emco:setBufferSize(bufferSize, deleteLines) line 778
Sets the buffer size and number of lines to delete for all managed miniconsoles.

Parameters:

  • bufferSize number number of lines of scrollback to maintain in the miniconsoles. Uses current value if nil is passed
  • deleteLines number number of line to delete if the buffer filles up. Uses current value if nil is passed
emco:setBackgroundImage(tabName, imagePath, mode) line 795
Sets the background image for a tab's console. use EMCO:resetBackgroundImage(tabName) to remove an image.

Parameters:

  • tabName string the tab to change the background image for.
  • imagePath string the path to the image file to use.
  • mode string the mode to use. Will default to "center" if not provided.
emco:resetBackgroundImage(tabName) line 817
Resets the background image on a tab's console, returning it to the background color

Parameters:

  • tabName string the tab to change the background image for.
emco:replay(tabName, numLines) line 848
Replays the last numLines lines from the log for tabName

Parameters:

  • tabName the name of the tab to replay
  • numLines the number of lines to replay
emco:replayAll(numLines) line 861
Replays the last numLines in all miniconsoles

Parameters:

  • numLines
emco:processTemplate(str, tabName) line 874
Formats the string through EMCO's template. |E is replaced with the EMCO's name. |N is replaced with the tab's name.

Parameters:

  • str the string to replace tokens in
  • tabName optional, if included will be used for |N in the templated string.
emco:setPath(path) line 884
Sets the path for the EMCO for logging

Parameters:

  • path the template for the path. @see EMCO:new()
emco:setFileName(fileName) line 900
Sets the fileName for the EMCO for logging

Parameters:

  • fileName the template for the path. @see EMCO:new()
emco:setCmdLineStyleSheet(styleSheet) line 916
Sets the stylesheet for command lines in this EMCO

Parameters:

  • styleSheet string the stylesheet to use for the command line. See https://wiki.mudlet.org/w/Manual:Lua_Functions#setCmdLineStyleSheet for examples
emco:enableCmdLine(tabName, template) line 929
Enables the commandLine on the specified tab.

Parameters:

  • tabName string the name of the tab to turn the commandLine on for
  • template the template for the commandline to use, or the function to run when enter is hit.

Usage:

    myEMCO:enableCmdLine(tabName, template)
emco:enableAllCmdLines() line 942
Enables all command lines, using whatever template they may currently have set
emco:disableAllCmdLines() line 949
Disables all commands line, but does not change their template
emco:disableCmdLine(tabName) line 957
Disables the command line for a particular tab

Parameters:

  • tabName string the name of the tab to disable the command line of.
emco:setCmdAction(tabName, template) line 970
Sets the command action for a tab's command line. Can either be a template string to send where '|t' is replaced by the text sent, or a funnction which takes the text

Parameters:

  • tabName string the name of the tab to set the command action on
  • template the template for the commandline to use, or the function to run when enter is hit.

Usage:

  • myEMCO:setCmdAction("CT", "ct |t") -- will send everything in the CT tab's command line to CT by doing "ct Hi there!" if you type "Hi there!" in CT's command line
  • myEMCO:setCmdAction("CT", function(txt) send("ct " .. txt) end) -- functionally the same as the above
emco:resetCmdAction(tabName) line 997
Resets the command action for tabName's miniconsole, which makes it work like the normal commandline

Parameters:

  • tabName string the name of the tab to reset the cmdAction for
emco:getCmdLine(tabName) line 1004
Gets the contents of tabName's cmdLine

Parameters:

  • tabName the name of the tab to get the commandline of
emco:printCmd(tabName, txt) line 1011
Prints to tabName's command line

Parameters:

  • tabName the tab whose command line you want to print to
  • txt the text to print to the command line
emco:clearCmd(tabName) line 1017
Clears tabName's command line

Parameters:

  • tabName string the tab whose command line you want to clear
emco:appendCmd(tabName, txt) line 1024
Appends text to tabName's command line

Parameters:

  • tabName string the tab whose command line you want to append to
  • txt string the text to append to the command line
emco:reset() line 1029
resets the object, redrawing everything
emco:fuzzyBoolean(bool) line 1071
Expands boolean definitions to be more flexible.
True values are "true", "yes", "0", 0, and true
False values are "false", "no", "1", 1, false, and nil

Parameters:

  • bool item to test for truthiness
emco:clear(tabName) line 1092
clears a specific tab

Parameters:

  • tabName string the name of the tab to clear
emco:clearAll() line 1104
clears all the tabs
emco:setTabFont(font) line 1114
sets the font for all tabs

Parameters:

  • font string the font to use.
emco:setSingleTabFont(tabName, font) line 1124
sets the font for a single tab. If you use setTabFont this will be overridden

Parameters:

  • tabName string the tab to change the font of
  • font string the font to use for that tab
emco:setFont(font) line 1134
sets the font for all the miniconsoles

Parameters:

  • font string the name of the font to use
emco:setSingleWindowFont(tabName, font) line 1153
sets the font for a specific miniconsole. If setFont is called this will be overridden

Parameters:

  • tabName string the name of window to set the font for
  • font string the name of the font to use
emco:setTabFontSize(fontSize) line 1170
sets the font size for all tabs

Parameters:

  • fontSize number the font size to use for the tabs
emco:setTabAlignment(alignment) line 1179
Sets the alignment for all the tabs

Parameters:

  • alignment Valid alignments are 'c', 'center', 'l', 'left', 'r', 'right', or '' to not include the alignment as part of the echo
emco:enableTabUnderline() line 1187
enables underline on all tabs
emco:disableTabUnderline() line 1195
disables underline on all tabs
emco:enableTabItalics() line 1203
enables italics on all tabs
emco:disableTabItalics() line 1211
enables italics on all tabs
emco:enableTabBold() line 1219
enables bold on all tabs
emco:disableTabBold() line 1227
disables bold on all tabs
emco:enableCustomTimestampColor() line 1235
enables custom colors for the timestamp, if displayed
emco:disableCustomTimestampColor() line 1240
disables custom colors for the timestamp, if displayed
emco:enableTimestamp() line 1245
enables the display of timestamps
emco:disableTimestamp() line 1250
disables the display of timestamps
emco:setTimestampFormat(format) line 1256
Sets the formatting for the timestamp, if enabled

Parameters:

  • format string Format string which describes the display of the timestamp. See: https://wiki.mudlet.org/w/Manual:Lua_Functions#getTime
emco:setTimestampBGColor(color) line 1269
Sets the background color for the timestamp, if customTimestampColor is enabled.

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setTimestampFGColor(color) line 1274
Sets the foreground color for the timestamp, if customTimestampColor is enabled.

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setAllTabName(allTabName) line 1281
Sets the 'all' tab name.
This is the name of the tab itself

Parameters:

  • allTabName string name of the tab to use as the all tab. Must be a tab which exists in the object.
emco:enableAllTab() line 1294
Enables use of the 'all' tab
emco:disableAllTab() line 1299
Disables use of the 'all' tab
emco:enableMapTab() line 1305
Enables tying the Mudlet Mapper to one of the tabs.
mapTabName must be set, or this will error. Forces a redraw of the entire object
emco:disableMapTab() line 1318
disables binding the Mudlet Mapper to one of the tabs.
CAUTION: this may have unexpected behaviour, as you can only open one Mapper console per profile so you can't really unbind it. Binding of the Mudlet Mapper is best decided at instantiation.
emco:setMapTabName(mapTabName) line 1327
sets the name of the tab to bind the Mudlet Map.
Forces a redraw of the object
CAUTION: Mudlet only allows one Map object to be open at one time, so if you are going to attach the map to an object you should probably do it at instantiation.

Parameters:

  • mapTabName string name of the tab to connect the Mudlet Map to.
emco:enableBlinkFromAll() line 1340
Enables tab blinking even if you're on the 'all' tab
emco:disableBlinkFromAll() line 1345
Disables tab blinking when you're on the 'all' tab
emco:enableGag() line 1350
Enables gagging of the line passed in to :append(tabName)
emco:disableGag() line 1355
Disables gagging of the line passed in to :append(tabName)
emco:enableBlink() line 1360
Enables tab blinking when new information comes in to an inactive tab
emco:disableBlink() line 1370
Disables tab blinking when new information comes in to an inactive tab
emco:enablePreserveBackground() line 1379
Enables preserving the chat's background over the background of an incoming :append()
emco:disablePreserveBackground() line 1384
Enables preserving the chat's background over the background of an incoming :append()
emco:setBlinkTime(blinkTime) line 1390
Sets how long in seconds to wait between blinks

Parameters:

  • blinkTime number time in seconds to wait between blinks
emco:setFontSize(fontSize) line 1417
Sets the font size of the attached consoles

Parameters:

  • fontSize number font size for attached consoles
emco:setInactiveTabCSS(stylesheet) line 1475
Sets the inactiveTabCSS

Parameters:

  • stylesheet string the stylesheet to use for inactive tabs.
emco:setActiveTabCSS(stylesheet) line 1482
Sets the activeTabCSS

Parameters:

  • stylesheet string the stylesheet to use for active tab.
emco:setActiveTabFGColor(color) line 1489
Sets the FG color for the active tab

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setInactiveTabFGColor(color) line 1496
Sets the FG color for the inactive tab

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setActiveTabBGColor(color) line 1504
Sets the BG color for the active tab.
NOTE: If you set CSS for the active tab, it will override this setting.

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setInactiveTabBGColor(color) line 1512
Sets the BG color for the inactive tab.
NOTE: If you set CSS for the inactive tab, it will override this setting.

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setConsoleColor(color) line 1519
Sets the BG color for the consoles attached to this object

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setTabBoxCSS(css) line 1536
Sets the CSS to use for the tab box which contains the tabs for the object

Parameters:

  • css string The css styling to use for the tab box
emco:setTabBoxColor(color) line 1549
Sets the color to use for the tab box background

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setConsoleContainerColor(color) line 1561
Sets the color for the container which holds the consoles attached to this object.

Parameters:

  • color Color string suitable for decho or hecho, or color name eg "purple", or table of colors {r,g,b}
emco:setConsoleContainerCSS(css) line 1568
Sets the CSS to use for the container which holds the consoles attached to this object

Parameters:

  • css string CSS to use for the container
emco:setGap(gap) line 1580
Sets the amount of space to use between the tabs and the consoles

Parameters:

  • gap number Number of pixels to keep between the tabs and consoles
emco:setTabHeight(tabHeight) line 1594
Sets the height of the tabs in pixels

Parameters:

  • tabHeight number the height of the tabs for the object, in pixels
emco:enableAutoWrap() line 1609
Enables autowrap for the object, and by extension all attached consoles.
To enable autoWrap for a specific miniconsole only, call myEMCO.windows[tabName]:enableAutoWrap() but be warned if you do this it may be overwritten by future calls to EMCO:enableAutoWrap() or :disableAutoWrap()
emco:disableAutoWrap() line 1623
Disables autowrap for the object, and by extension all attached consoles.
To disable autoWrap for a specific miniconsole only, call myEMCO.windows[tabName]:disableAutoWrap() but be warned if you do this it may be overwritten by future calls to EMCO:enableAutoWrap() or :disableAutoWrap()
emco:setWrap(wrapAt) line 1637
Sets the number of characters to wordwrap the attached consoles at.
it is generally recommended to make use of autoWrap unless you need a specific width for some reason

Parameters:

  • wrapAt
emco:append(tabName, excludeAll) line 1660
Appends the current line from the MUD to a tab.
depending on this object's configuration, may gag the line
depending on this object's configuration, may gag the next prompt

Parameters:

  • tabName string The name of the tab to append the line to
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:addNotifyTab(tabName) line 1692
Adds a tab to the list of tabs to send OS toast/popup notifications for

Parameters:

  • tabName string the name of a tab to enable notifications for

Returns:

    true if it was added, false if it was already included, nil if the tab does not exist.
emco:removeNotifyTab(tabName) line 1706
Removes a tab from the list of tabs to send OS toast/popup notifications for

Parameters:

  • tabName string the name of a tab to disable notifications for

Returns:

    true if it was removed, false if it wasn't enabled to begin with, nil if the tab does not exist.
emco:addGag(pattern) line 1720
Adds a pattern to the gag list for the EMCO

Parameters:

  • pattern string a Lua pattern to gag. http://lua-users.org/wiki/PatternsTutorial

Returns:

    true if it was added, false if it was already included.
emco:removeGag(pattern) line 1731
Removes a pattern from the gag list for the EMCO

Parameters:

  • pattern string a Lua pattern to no longer gag. http://lua-users.org/wiki/PatternsTutorial

Returns:

    true if it was removed, false if it was not there to remove.
emco:matchesGag(str) line 1742
Checks if a string matches any of the EMCO's gag patterns

Parameters:

  • str string The text you're testing against the gag patterns

Returns:

    false if it does not match any gag patterns. true and the matching pattern if it does match.
emco:enableNotifyWithFocus() line 1752
Enables sending OS notifications even if Mudlet has focus
emco:disableNotifyWithFocus() line 1757
Disables sending OS notifications if Mudlet has focus
emco:cecho(tabName, message, excludeAll) line 1875
cecho to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to cecho to
  • message string the message to cecho to that tab's console
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:decho(tabName, message, excludeAll) line 1885
decho to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to decho to
  • message string the message to decho to that tab's console
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:hecho(tabName, message, excludeAll) line 1895
hecho to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to hecho to
  • message string the message to hecho to that tab's console
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:echo(tabName, message, excludeAll) line 1905
echo to a tab, maintaining functionality

Parameters:

  • tabName string the name of the tab to echo to
  • message string the message to echo to that tab's console
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:cechoLink(tabName, text, command, hint, excludeAll) line 1982
cechoLink to a tab

Parameters:

  • tabName string the name of the tab to cechoLink to
  • text string the text underlying the link
  • command string the lua code to run in string format
  • hint string the tooltip hint to use for the link
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:dechoLink(tabName, text, command, hint, excludeAll) line 1994
dechoLink to a tab

Parameters:

  • tabName string the name of the tab to dechoLink to
  • text string the text underlying the link
  • command string the lua code to run in string format
  • hint string the tooltip hint to use for the link
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:hechoLink(tabName, text, command, hint, excludeAll) line 2006
hechoLink to a tab

Parameters:

  • tabName string the name of the tab to hechoLink to
  • text string the text underlying the link
  • command string the lua code to run in string format
  • hint string the tooltip hint to use for the link
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:echoLink(tabName, text, command, hint, useCurrentFormat, excludeAll) line 2019
echoLink to a tab

Parameters:

  • tabName string the name of the tab to echoLink to
  • text string the text underlying the link
  • command string the lua code to run in string format
  • hint string the tooltip hint to use for the link
  • useCurrentFormat boolean use the format for the window or blue on black (hyperlink colors)
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:cechoPopup(tabName, text, commands, hints, excludeAll) line 2031
cechoPopup to a tab

Parameters:

  • tabName string the name of the tab to cechoPopup to
  • text string the text underlying the link
  • commands table the lua code to run in string format
  • hints table the tooltip hint to use for the link
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:dechoPopup(tabName, text, commands, hints, excludeAll) line 2043
dechoPopup to a tab

Parameters:

  • tabName string the name of the tab to dechoPopup to
  • text string the text underlying the link
  • commands table the lua code to run in string format
  • hints table the tooltip hint to use for the link
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:hechoPopup(tabName, text, commands, hints, excludeAll) line 2055
hechoPopup to a tab

Parameters:

  • tabName string the name of the tab to hechoPopup to
  • text string the text underlying the link
  • commands table the lua code to run in string format
  • hints table the tooltip hint to use for the link
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:echoPopup(tabName, text, commands, hints, useCurrentFormat, excludeAll) line 2068
echoPopup to a tab

Parameters:

  • tabName string the name of the tab to echoPopup to
  • text string the text underlying the link
  • commands table the lua code to run in string format
  • hints table the tooltip hint to use for the link
  • useCurrentFormat boolean use the format for the window or blue on black (hyperlink colors)
  • excludeAll boolean if true, will exclude this from being mirrored to the allTab
emco:addAllTabExclusion(tabName) line 2076
adds a tab to the exclusion list for echoing to the allTab

Parameters:

  • tabName string the name of the tab to add to the exclusion list
emco:removeAllTabExclusion(tabName) line 2086
removess a tab from the exclusion list for echoing to the allTab

Parameters:

  • tabName string the name of the tab to remove from the exclusion list
emco:enableBlankLine() line 2124
Enable placing a blank line between all messages.
emco:disableBlankLine() line 2129
Enable placing a blank line between all messages.
emco:enableScrollbars() line 2134
Enable scrollbars for the miniconsoles
emco:disableScrollbars() line 2140
Disable scrollbars for the miniconsoles
emco:save() line 2160
Save an EMCO's configuration for reloading later. Filename is based on the EMCO's name property.
emco:load() line 2229
Load and apply a saved config for this EMCO
emco:enableTabLogging(tabName) line 2310
Enables logging for tabName

Parameters:

  • tabName string the name of the tab you want to enable logging for
emco:disableTabLogging(tabName) line 2323
Disables logging for tabName

Parameters:

  • tabName string the name of the tab you want to disable logging for
emco:enableAllLogging() line 2335
Enables logging on all EMCO managed consoles
emco:disableAllLogging() line 2343
Disables logging on all EMCO managed consoles
generated by LDoc 1.5.0 Last updated 2023-05-29 18:41:27