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.

More complex HTTP event triggers....

If you have a question or need help, this is the place to be.
Post Reply
User avatar
Slippy
Posts: 5
Joined: Sun Mar 25, 2007 10:21 pm
Location: Luton, Beds, UK
Contact:

More complex HTTP event triggers....

Post by Slippy »

One thing I'm really enjoying experimenting with at the moment is the http event trigger. I'm testing it by calling up http://127.0.0.1?whatever.

One thing I noticed while playing around is if i call

127.0.0.1?msg&hello world

It shows up in the event log as

HTTP.msg['hello%20world']

Does this mean that EventGhost has parsed the parameters I've sent it? How can I pass these parameters to another program?

I've tried this:
Macro: message
Event: HTTP.msg
Action: Run program C:\Program Files\4NT\4NT.EXE
with commandline params /C MSGBOX OK "Message" %1

Now, I know that "%1" is not the correct syntax for EventGhost to pass that parameter from the HTTP event to the 4NT program....because it doesn't work.

[Edit] - It works in that the "message" macro is highlighted when the HTTP.msg event is received, the 4NT program is called it's just that the commandline truncates after "message"....well, it doesn't truncate, there's just nothing there....obviously because I'm not using the right syntax
Blah. I'm rambling. You know what I mean though.

So, can anyone help me with passing parameters from an HTTP event to an action in EventGhost?

I have no real reason to do this atm, I'm just curious as to how/if it can be done.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Use this in the parameter box:
/C MSGBOX OK "Message" {eg.event.payload[0]}

{eg.event.payload[1]} is the second payload if there is one and so on.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply