I have been using Indigo 7.3 for quite sometime since Applescript was removed from the software. I want to upgrade to 2022.1 software.
I tried this in Indigo 7.3 and the new Indigo 2022.1.
So I'm converting Apple script to Python. I'm having a problem writing to a variable and making the "If statement" work. I have looked at others software using Python and cant seem to make it work without errors.
here is an example with trying to put 7 into a variable.
Just to show that I have the correct variable reference number:
indigo.variables[489801056] # "HumidityTempDiffGarageNorth"
test = 7
indigo.variable.updateValue(489801056, test)
This is the error that comes back in the event log.
Script Error embedded script: 'instancemethod' object has no attribute '__getitem__'
Script Error Exception Traceback (most recent call shown last):
embedded script, line 11, at top level
TypeError: 'instancemethod' object has no attribute '__getitem__'
I have tried also brackets [489801056, test] instead of (489801056, test) but both fail.