Plugins/EventGhost

From EventGhost
Jump to: navigation, search
Plugin Information
Name EventGhost
Authors Bitmonster
Current Version1 1.0.0
Official Website N/A
Forum Page N/A
Source Code [1]
Type Core
Source Bundled
Minimum EventGhost Version N/A

1 This is the current version as of this page's last update. Newer versions may be available.

This wiki page may be out of date. Always consult the above website and forum links for possibly updated information.

This plugin provides events for manipulating EventGhost itself, including the way it runs your macros.

Configuration

This plugin has no configuration options.

Events

Event Payload? Enduring? Description
Event.pngMessageBox.alias.BUTTON_NAME Y N May be triggered by Action.pngShow Message Box, which see for details.

Actions

Python Command

Executes a single Python statement.

TODO: There should probably be a page (if not a whole section of pages) dedicated to using python in EventGhost.

Python Script

Executes a full python script, one statement at a time.

TODO: There should probably be a page (if not a whole section of pages) dedicated to using python in EventGhost.

Auto-Repeat Macro

Setting Default {·} Description
Start first repetition after N seconds 0.60 N Wait this long after the event is triggered before repeating the macro.
with one repetition every N seconds 0.30 N Once repetition starts, wait this long between repetitions.
Increase repetition the next N seconds 3.00 N If the event endures for this long, reduce the repetition delay to the setting below.
to one repetition every N seconds 0.01 N If the event endures for as long as the setting above, wait this long between repetitions.

This action is only useful when triggered by an Enduring Event. It causes the containing macro to be repeatedly run for as long as the event is active.


Clear Pending Events

It is useful in case a macro has just some lengthy processing, and events have queued up during that processing which should not be processed.

Example: You have a lengthy "start system" macro which takes about 90 seconds to process. The end user will not see anything until the projector lights up, which takes 60s. It is very likely that he presses the remote button which starts the macro for several times in a row, causing all of the lengthy processing to start over and over again. If you place this action at the end of your macro, all the excessive remote key presses will be discarded.

Comment

This action does nothing. It is useful for adding comments to your macro describing what it is doing.

Disable Item

Disables one item in your configuration tree.

  • Disabling an event within a macro prevents that event from triggering the macro. The macro itself can still be run by other means.
  • Disabling an action causes that action to be skipped over when its containing macro is run.
  • Disabling a macro prevents that macro from running by any means, even manually by the user.
  • Disabling a folder causes all macros within that folder (or within any other folders contained by this folder) from being run when their associated events would otherwise trigger them.

You can also manually disable any of the above types of item in your configuration tree by right-clicking on it and selecting "Disable".

Dump Result to Log

Outputs the most recent eg.result to the EventGhost log. Useful for debugging.

This action does not alter the contents of eg.result.

Enable Item

Enables one item in your configuration tree. See Action.pngDisable Item for information about disabled items.

Enable Item Exclusively

Enables one item in your configuration tree, but also disables all other folders and macros that are at the same level (i.e., in the same folder) as the item you specify.

Action.pngDisable Item for information about disabled items.

Get Item State

Tests whether an item in your configuration tree is enabled. The result is placed in eg.result for use by subsequent actions in your macro.

The result will be True if the item is enabled, or False if it is disabled.

Jump

Setting Default {·} Description
If last action was successful N Under what condition to jump to the specified macro.
Jump to (no default) N Macro to jump to.
and return after execution False N Whether to return to this macro after the called macro has completed.

Executes another macro. In its default configuration, it will only execute the other macro if the last action was successful. "Success" is defined as eg.result evaluating to a True value; for example, if Action.pngGet Item State is called, and the tested item is enabled.

You can optionally jump to the other macro if the last action was unsuccessful, or unconditionally. You can also choose whether the current macro should continue once the called macro completes.


Jump with "Else"

Setting Default {·} Description
If last action was successful N Under what condition to jump to the specified macro.
Jump to (no default) N Macro to jump to in the above condition.
and return after execution False N Whether to return to this macro after the called macro has completed.
Else jump to (no default) N Macro to jump to if the above condition is not met.
and return after execution False N Whether to return to this macro after the called macro has completed.

This action is the same as Action.pngJump, except that you can also specify a second macro to jump to if the condition you specify is not met.


Jump If Duplicate Event

Setting Default {·} Description
If event arrives twice within N seconds 0.50 N Time window to check for duplicate events.
Jump to (no default) N Macro to jump to in the above condition.

This action lets you specify that a different macro should be called if the event which triggered this macro occurs twice in a short time. For example, you could have a single button on a remote control behave differently if it is pressed twice quickly than if it is pressed only once.

If the event is triggered twice in the specified time, control passes to the macro you specify and does not return to the current macro. Otherwise, the current macro continues.


Jump If Long Press

Setting Default {·} Description
If button held for longer than N seconds 2.00 N How long the event should endure in order to count as a long press.
Jump to (no default) N Macro to jump to in the above condition.

This action lets you specify that a different macro should be called if the event which triggered this macro endures for a specified period of time. For example, you could have a single button on a remote control behave differently if it is held down than if it is pressed and released.

Despite the action's name, this can be used for any Enduring Event, not just button presses.

If the event endures for the specified time, control passes to the macro you specify and does not return to the current macro. Otherwise, the current macro continues.



Open Configuration

Setting Default {·} Description
Action or plugin (no default) N The action or plugin in your configuration tree whose configuration dialog you wish to open.

This action opens the configuration dialog of the plugin or action from your configuration tree that you specify. This is the same as double-clicking on the item, and allows you to reconfigure your plugin or action on the fly.


Open EventGhost

This action allows you to show, hide, or toggle the visibility of the EventGhost window. It can be used even if you have hidden the EventGhost system tray icon.

Show Message Box

Setting Default {·} Description
Message box type System (Windows) N Whether the message box should be a Windows message box, or a tweaked EventGhost message box.
Title (no default) Y? Title of the message box to show.
Message (no default) Y? Message to show in the message box.
Alias (no default) Y? Alias to use in the event triggered by this message box.
Payload (no default) Y? Payload to include in the event triggered by this message box.
Buttons OK N What button(s) should appear at the bottom of the message box.
Icon No icon N What icon should appear at the left of the message box.
Wait for the Message Box to close False N If checked, causes your macro to pause until the message box is dismissed. This allows you to retrieve the name of the button pressed by checking eg.result instead of having to create separate macros.
Auto-Close Timer (s) 0 N Close the message box automatically if the user doesn't close it after this many seconds. This option is only available for Tweaked (EventGhost) message boxes.

This action pops up a message box to show a message to the user. You can optionally wait for the user to click on a button to dismiss the message box before allowing your macro to proceed.

If you do wait for the macro to proceed, eg.result will contain the name of the button which the user pressed, in all upper-case. Otherwise, your macro will continue to execute even while the message box is still visible.

When the message box is dismissed, EventGhost generates an event. The event is Event.pngMessageBox.alias.BUTTON_NAME, where alias is what you specified in the configuration, and BUTTON_NAME is the name of the button the user pressed, in all upper-case. If you specified a payload in the configuration, the event will have this payload. (If you did not specify an alias, the triggered event will have two periods side-by-side, as in Event.pngMessageBox..OK.)


Show OSD

This action shows an On-Screen Display (OSD) message to the user. An OSD is similar to, say, the channel number message on your television, in that it appears over top of everything else on your screen, without being in a separate window.

You can specify the message to display (which may include Python variable expansion), the position of the message, the font, size, colour, and outline of the message. You can additionally cause the message to disappear automatically after a specified time, or to persist indefinitely.

This action, while handy, does have its limitations. For example, you cannot have multiple font sizes in a single message. There may be third-party plugins with more flexibility, should you need it.

Stop Processing Event

Tells EventGhost to not run any further macros which would be triggered by the event which triggered this macro.

Trigger Event

Setting Default {·} Description
Event string to fire (no default) Y? The complete string of the event you wish to trigger.
Delay the firing of the event for N seconds 0.00 N Wait this long before triggering the event.

This action lets you trigger an arbitrary event.


Wait

Pauses execution of your macro for the specified number of seconds.

This can be useful in cases where you need to wait for something before your next action will be effective. For example, when sending a series of remote control button presses to a television, you will probably need to wait about 0.5 seconds after "pressing" the Menu button for the TV to display its menu, before you can then press another button to choose a particular menu entry.

See Also