Author Topic: Eventghost broadcasts as events?  (Read 1829 times)

0 Members and 1 Guest are viewing this topic.

Sinbe

  • $upporter
  • Jr. Member
  • *****
  • Posts: 12
  • Karma: 0
    • View Profile
Eventghost broadcasts as events?
« on: February 06, 2014, 12:21:55 PM »
I was just trying to set up a few things to get rid of some false positives when typing on keyboard and so on. I would need to disable some groups when I don't have certain activities running. For example launching MediaPortal triggers an Eventghost macro that enables MP groups in Voxcommando. When I start playing a file on MP it would disable a few of the navigation groups to avoid false positives on short words in the program. I know how to trigger these events on Eventghost and I can receive these in Vox, but I don't know how to use them. Dragging them to the editor results in a Unknown Action Error.

The message I'm trying to send with the broadcaster is MediaPortalOn without any payload. What Vox receives is:
(wlan-icon) MediaPortalOn&&
(cogwheel icon) MediaPortalOn:

Hovering cursor over the cogwheel shows "Error: Unknown Action". Is it possible to make VC do what I want?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Eventghost broadcasts as events?
« Reply #1 on: February 06, 2014, 12:31:05 PM »
Here is a sample macro for EventGhost that will trigger an event in VoxCommando.

Just paste the xml into your EventGhost tree.

Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1572">
    <Macro Name="Broadcaster: Broadcast: event" Expanded="True">
        <Action>
            BroadcastListener.Broadcast(u'event', u'test.thing&amp;&amp;I am payload1', 33000)
        </Action>
    </Macro>
</EventGhost>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Eventghost broadcasts as events?
« Reply #2 on: February 06, 2014, 12:32:26 PM »
but you can also do this without using eventghost.

Groups can be automatically associated with a program.  Right-click a group and check out the properties.

Events are also generated automatically in VC when programs gain and lose focus.

Sinbe

  • $upporter
  • Jr. Member
  • *****
  • Posts: 12
  • Karma: 0
    • View Profile
Re: Eventghost broadcasts as events?
« Reply #3 on: February 06, 2014, 01:03:28 PM »
but you can also do this without using eventghost.

Groups can be automatically associated with a program.  Right-click a group and check out the properties.

Events are also generated automatically in VC when programs gain and lose focus.

I know that. However eventghost allows me to use stuff like "mediaportal long video pause" and so on that I already use to trigger my lights on when I pause playback. It'll be easier this way.

About the script, is the u'event' something I leave untouched and the u'test.thing&&payload' is the part I modify?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Eventghost broadcasts as events?
« Reply #4 on: February 06, 2014, 11:11:14 PM »
Paste it into your eventGhost tree and then use the UI to modify it.

The format to use is

event&&TheNameOfYourEventHere&&APayloadHereIfYouWant&&AnotherPayloadIfYouWant