I get a network event that looks like this:
.RadioPuta ['192.168.0.167', u'P1']
I would like to then use .RadioPuta (pillow, not the Spanish meaning...) as a trigger, which is easy. Then I would like to send only the P1 part (the radio channel) in a command line to another program, using it as a command line option in Start application. But using the payload as it is, gives the full payload with the IP and the u, so I have to split it.
I try this:
Code: Select all
eg.event.payload_copy = eg.event.payload
my_data = eg.event.payload_copy.split(' ')
eg.globals.PutaKanal = my_data [2]
Code: Select all
"{eg.globals.PutaKanal}"Code: Select all
21:40:35 Error in Action: "Starte radiokanal via Girder"
21:40:35 Traceback (most recent call last) (1669):
21:40:35 File "C:\Programfiler\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
21:40:35 return self(*args)
21:40:35 File "C:\Programfiler\EventGhost\plugins\System\Execute.py", line 105, in __call__
21:40:35 arguments = eg.ParseString(arguments)
21:40:35 File "C:\Programfiler\EventGhost\eg\Utils.py", line 204, in ParseString
21:40:35 res = eval(word, {}, eg.globals.__dict__)
21:40:35 File "<string>", line 1, in <module>
21:40:35 AttributeError: 'Bunch' object has no attribute 'PutaKanal'