You can do one of two things. You can use the network event sender and reciever, but to have bi-directional support you need to load both plugins on each and make sure all the passwords and ports are set correctly.
I find it easier to use python and create scripts that send events through the webserver. Example Python Script would be:
- Code: Select all
import urllib
suf = eg.event.suffix
suf = str(object[object.find(".")+1:]);
pay = eg.event.payload
set = "192.168.0.100"
url = ("http://%s/?%s&%s"%(set, suf, pay))
response = urllib.urlopen(url).read()
or you could hard code it:
- Code: Select all
import urllib
url = ("http://192.168.0.100/?HEYDOSOMETHING&MOVIETITLE")
response = urllib.urlopen(url).read()
Both are the same thing. You can also cheat and instead of injecting data with %s you can just surround the variables with {eg.globals.example}
so instead of: url = ("http://%s/?%s&%s"%(set, suf, pay))
you can use: url = ("http://{eg.global.ipadd2}/?{eg.event.suffix}&{eg.event.payload}")
Choose your poison. The first example is straight up python, the second is unique to EventGhost.
*note* you may want to call an empty file that exists (I use Ajax.xhr) so that it calls an actual page and doesn't generate a potential error.
Example: url = ("http://192.168.0.100/Ajax.xhr?HEYDOSOMETHING&MOVIETITLE")
I like this method the best because you can consolidate your macro's into one do everything macro, and then let it just resend triggered events. For instance, you could use a button on a web page that toggles which system to send it to (enables a folder or macro) and then just resends the events to that system. Just a thought.