Everything special that is needed from EventGhost for scripting and writing
plugins is stuffed into the
eg module. It includes many functions,
variables, classes and objects. You could actually say
eg is EventGhost
Namespace that holds all global variables used by PythonCommand actions. PythonScripts (and all other code) can access these globals through
- Base class of every EventGhost plugin written in Python.
- Base class of every action of a EventGhost plugin written in Python
- Eased handling of serial port communication.
- General purpose message pumping thread, that is used in many places.
- A panel with some magic.
- Universal collection of a bunch of named stuff.
- Returns a list of window handles matching a number of criteria.
- A convenience module for checking the windows version.
- A wx.Control that shows a integer value and spin buttons to let the user easily input an integer value.
- A wx.Control that shows a fixed width floating point value and spin buttons to let the user easily input a floating point value.
- A replacement for wx.MessageDialog, that wraps the message, if the dialog would get to wide.
- A wx.Choice control, that shows all available displays.
- A wx.Choice control that shows all available serial ports on the system.
- A control to allow the user to type in a filename or browse with the standard file dialog to select a file.
- A control to allow the user to type in a filename or browse with the standard file dialog to select a directory.
- A button to select a font.
Sometimes you want to quickly exit a PythonScript, because you don’t want to build deeply nested if-structures for example. eg.Exit() will exit your PythonScript immediately. (Note: This is actually a sys.exit() but will not exit EventGhost, because the SystemExit exception is catched for a PythonScript.)
Instructs EventGhost to stop executing the current macro after the current action (thus the PythonScript or PythonCommand) has finished.
TriggerEvent(suffix, payload=None, prefix='Main', source=<dynamic-module 'eg'>)
Trigger an event
RegisterPlugin(name=None, description=None, kind='other', author='[unknown author]', version='[unknown version]', icon=None, canMultiLoad=False, createMacrosOnAdd=False, url=None, help=None, guid=None, **kwargs)¶
Registers information about a plugin to EventGhost.
- name – should be a short descriptive string with the name of the plugin.
- description – a short description of the plugin.
- kind – gives a hint about the category the plugin belongs to. It
should be a string with a value out of
"remote"(for remote receiver plugins),
"program"(for program control plugins),
"external"(for plugins that control external hardware) or
"other"(if none of the other categories match).
- author – can be set to the name or a list of names of the developer(s) of the plugin.
- version – can be set to a version string.
- icon – can be a base64 encoded image for the plugin. If
icon == None, an “icon.png” will be used if it exists in the plugin folder.
- canMultiLoad – set this to
True, if a configuration can have more than one instance of this plugin.
- createMacrosOnAdd – if set to
True, when adding the plugin, EventGhost will ask the user, if he/she wants to add a folder with all actions of this plugin to his/her configuration.
- url – displays a clickable link in the plugin info dialog.
- help – a longer description and/or additional information for the plugin. Will be added to ‘description’.
- guid – will help EG to identify your plugin, so there are no name clashes with other plugins that accidentally might have the same name and will later ease the update of plugins.
- **kwargs – just to consume unknown parameters, to make the call backward compatible.
Prints an error message to the logger. The message will get a special icon and a red colour, so the user can easily identify it as an error message.