Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Programmatically raise events in EG? (sendmessage, tcp,...)

If you have a question or need help, this is the place to be.
Post Reply
User
Posts: 47
Joined: Sun May 11, 2008 12:56 pm

Programmatically raise events in EG? (sendmessage, tcp,...)

Post by User »

Hi!
Is it possible to raise an event in EG from another program?
Like SENDMESSAGE or POSTMESSAGE and stuff?
The Network event receiver could work too, but i find NO documentation and dont get it to work. Beside that, it'll be easier to just respond to a sendmessage.

Or is there any other solution?

Thanks in advance!
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Programmatically raise events in EG? (sendmessage, tcp,...)

Post by jonib »

Using the command line of EventGhost you can create an event in EventGhost.

But I'm not sure what you want to do maybe you can elaborate? as there are many ways to do stuff in EvenGhost.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Programmatically raise events in EG? (sendmessage, tcp,...)

Post by jinxdone »

- Run "eventghost.exe -e event payload" to trigger an event.
- Use the COM object to trigger event (example below)
- Use the network sender/receiver. It's not really that complicated, just look at the code and duplicate what it does in your own application
- Use the simpler UDP broadcast listener plugin in EG (Search the forum for the plugin)

Example vbscript that uses the COM object

Code: Select all

Set EG = WScript.CreateObject("EventGhost")
EG.TriggerEvent "MyEvent", "Payload"
-jinxdone
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Programmatically raise events in EG? (sendmessage, tcp,...)

Post by Livin »

What about sending a command via HTTP... just using the Webserver plugin?
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
jsonnabend
Experienced User
Posts: 127
Joined: Wed Apr 23, 2008 7:35 pm

Re: Programmatically raise events in EG? (sendmessage, tcp,...)

Post by jsonnabend »

Livin wrote:What about sending a command via HTTP... just using the Webserver plugin?
I've worked up a Winamp plugin that implements a lightweight web server to remotely control winamp (I know, I'm not the first). The more I use that, the more convinced I am that http is the best way to remotely interact with programs like Eventghost. Why create a whole new protocol when the HTTP protocol is ubiquitous and well defined?

- Jeff
Post Reply