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.

I can't tell what the payload is?

If you have a question or need help, this is the place to be.
Post Reply
EzraBlankMarks
Posts: 1
Joined: Sat Aug 08, 2015 5:13 pm

I can't tell what the payload is?

Post by EzraBlankMarks »

Image.PNG
I am trying to activate a macro by using an event (duh). As you can see, dragging the event over does not include all of the information that I need. I'm using a python script to try to have the event only activate if all the criteria is met (if the payload matches). The only problem is that I don't know what the payload is on the event that I circled in red. I thought that it would obviously be the stuff within the single quotes, but it doesn't seem to be. Please help (with telling me what the payload is)!! To clarify, the end goal is to make the word "That" activate a different macro than if I replaced it with the word "Apple" for example.
kkl
Experienced User
Posts: 317
Joined: Wed May 04, 2011 9:32 pm

Re: I can't tell what the payload is?

Post by kkl »

The payload data is kept in the variable eg.event.payload. If you search for that term, you'll find many examples of how to parse it.
Javier
Experienced User
Posts: 73
Joined: Sun Dec 01, 2013 3:45 pm

Re: I can't tell what the payload is?

Post by Javier »

AutoRemote does not send the payload like most items

http://joaoapps.com/autoremote/eventghost/

ÔÇóIf you use AutoRemoteÔÇÖs command system in a message sent to EventGhost, all your parameters (words to the left of =:=) will be available to use in other EventGhost actions. Use {eg.event.payload.arpar[0]}, {eg.event.payload.arpar[1]}, etc to access them. To access your command (phrase on the right of =:=) use {eg.event.payload.arcomm}.


So in your case it will be

Code: Select all

print(eg.event.payload.arcomm)
or

Code: Select all

print(eg.event.payload.arcomm[0])
if you look at the info above the event it shows the variable names :)
Post Reply