http://192.168.2.103/index.html?volumeZ1&1b
volumez1 is the event and the above appears like this in eventghost
HTTP.volumeZ1 [u'1b']
How do I access the 1b argument to pass it to a plugin command.
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.
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.
access second argument of url string
Re: access second argument of url string
This is the payload of the event. use eg.event.payload in a macro. Since the payload is a list in this case you have to use eg.event.payload[0]
Re: access second argument of url string
do I have to put it in curly brackets or anything? The variable I always end up getting is the string literal eg.event.payload[0]
Re: access second argument of url string
That's right. Curly braces trigger the evaluating mechanism of EG.
Re: access second argument of url string
also, within a plugin script how can I test to see if eg.event exists without throwing a NoneType error when it doesnt?
Re: access second argument of url string
Fiasco wrote:also, within a plugin script how can I test to see if eg.event exists without throwing a NoneType error when it doesnt?
Code: Select all
if eg.event:
#do your stuff
Re: access second argument of url string
I've got my onkyo macros on the right screen of eventghost.Bartman wrote:That's right. Curly braces trigger the evaluating mechanism of EG.
I tried putting {eg.event.payload[0]} as the argument to the macro but within the script I end up with a string literal of {eg.event.payload[0]}
Re: access second argument of url string
call eg.ParseString to evalute the input