Apparently the Python script command doesn't support some characters in the script parameter.
The following EventGhost command works fine e. g.:
<Action XML_Guid="{98538267-161B-488C-8E99-C15191B82497}"> Tira.TransmitIR('\x00\x00\x00\x00\x08\x00\x00\x00&\x01\x00\x00K\x00\x00\x00\x8e\x00\x00\x00\xc0\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x88\xd7\t\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\xc0]\x00\x00\x01\x00\x00\x00?\x00\x00\x00\x1f\x00\x00\x00\x00\x01\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x02\x01\x02\x01\x01\x01\x01\x03\x00\x01\x01\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x02\x01\x02\x01\x01\x01\x01', 2, -1)
</Action>
But when copying this command as Python script and executing it, an exception is thrown:
eg.plugins.Tira.TransmitIR('\x00\x00\x00\x00\x08\x00\x00\x00&\x01\x00\x00K\x00\x00\x00\x8e\x00\x00\x00u\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x88\xd7\t\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\xc0]\x00\x00\x01\x00\x00\x00?\x00\x00\x00\x1f\x00\x00\x00\x00\x01\x02\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x02\x01\x02\x01\x01\x01\x01\x03\x00\x01\x02\x01\x01\x01\x02\x01\x01\x01\x02\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x02\x01\x02\x01\x01\x01\x01', 2, -1)
But with other IR codes the Python script command works e. g.:
eg.plugins.Tira.TransmitIR('\x00\x00\x00\x00\x08\x00\x00\x00h\x04\x00\x002\x02\x00\x00A\x00\x00\x00\xd0\x00\x00\x00n\x13\x00\x00\x18\x01\x00\x00\xda.\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x004\x88\xb8\t\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\x90e\x00\x00\x00\x00\x00\x00K\x00\x00\x00G\x00\x00\x00\x00\x01\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x04\x00\x05\x02\x06\x00\x05\x02', 1, -1)
Is it because of the & part in the script parameter?
Python script command doesn't work under circumstances
Re: Python script command doesn't work under circumstances
Someone, any idea?
-
- Posts: 1
- Joined: Wed Dec 29, 2021 8:53 am
Re: Python script command doesn't work under circumstances
The parameter seems like a string of byte characters, but some of the characters should not be there. Some of the bytes have probably been converted to their ASCII equivalents like &, K, u and \n.
If you can find a way to copy the string with correct bytes that would be the safest, but you can probably look up the ASCII codes for the characters and replace them with the correct byte.
If you can find a way to copy the string with correct bytes that would be the safest, but you can probably look up the ASCII codes for the characters and replace them with the correct byte.
Re: Python script command doesn't work under circumstances
Thanks for your reply.
Yes, but how?
Neither in the EventGhost user interface nor in the config XML file the string is shown with the correct bytes.
Yes, but how?

Neither in the EventGhost user interface nor in the config XML file the string is shown with the correct bytes.