Two points:
All :...: must be place before other parameters.
Use :enable: displayVar(split(getVarList(1),"\n"));" to see the actual value of the variables, it is not 1
Thanks for the tip about the "::" statement placement. I fixed that.
But still no luck with the :enable: logic.
First, I added the displayVar snippet. That produced the list shown in the attachment.
Next, I tried using that exact sequence in the enable section, like this:
:enable: Ch2Setup.Trigger!={string}match(unQuote(value),\x22TINT\x22)
But that triggered an error from Java, that looked like this:
Exception in thread "AWT-EventQueue-0" dk.hkj.script.ProgramExceptions$InvalidException: <{> is not a valid token
Ch2Setup.Trigger!={____<----____string}match(unQuote(value),\x22TINT\x22)
at dk.hkj.script.Program.nextTokenWhiteSpace(Program.java:646)
at dk.hkj.script.Program.nextToken(Program.java:673)
at dk.hkj.script.Script.next(Script.java:102)
at dk.hkj.script.Script.parseCompare(Script.java:531)
at dk.hkj.script.Script.parseLogical(Script.java:561)
at dk.hkj.script.Script.parseQuestionMark(Script.java:587)
at dk.hkj.script.Script.parseExpression(Script.java:612)
at dk.hkj.script.Script.expression(Script.java:1220)
at dk.hkj.devices.SetupFormats.calcEnable(SetupFormats.java:344)
at dk.hkj.devices.SetupFormats.enableItems(SetupFormats.java:332)
at dk.hkj.main.PopupSetupSelection.initialSync(PopupSetupSelection.java:125)
at dk.hkj.main.PopupSetupSelection.timerUpdate(PopupSetupSelection.java:131)
at dk.hkj.main.PopupSetupSelection.access$3(PopupSetupSelection.java:129)
at dk.hkj.main.PopupSetupSelection$3.actionPerformed(PopupSetupSelection.java:88)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
So I removed the offending "{string}" token, changing the line to this:
:enable: Ch2Setup.Trigger!=match(unQuote(value),\x22TINT\x22)
That generated a new error:
Exception in thread "AWT-EventQueue-0" dk.hkj.script.ProgramExceptions$UnknownException: Variable not found value
Ch2Setup.Trigger!=match(unQuote(value)____<----____,\x22TINT\x22)
at dk.hkj.script.Script.getVar(Script.java:73)
at dk.hkj.script.Script.parseValue(Script.java:281)
at dk.hkj.script.Script.parseBitOp(Script.java:316)
at dk.hkj.script.Script.parseProduct(Script.java:388)
at dk.hkj.script.Script.parseSum(Script.java:470)
at dk.hkj.script.Script.parseCompare(Script.java:525)
at dk.hkj.script.Script.parseLogical(Script.java:561)
at dk.hkj.script.Script.parseQuestionMark(Script.java:587)
at dk.hkj.script.Script.parseExpression(Script.java:612)
at dk.hkj.script.Script.parseParamList(Script.java:123)
at dk.hkj.script.Script.parseValue(Script.java:267)
at dk.hkj.script.Script.parseBitOp(Script.java:316)
at dk.hkj.script.Script.parseProduct(Script.java:388)
at dk.hkj.script.Script.parseSum(Script.java:470)
at dk.hkj.script.Script.parseCompare(Script.java:525)
at dk.hkj.script.Script.parseLogical(Script.java:561)
at dk.hkj.script.Script.parseQuestionMark(Script.java:587)
at dk.hkj.script.Script.parseExpression(Script.java:612)
at dk.hkj.script.Script.parseParamList(Script.java:123)
at dk.hkj.script.Script.parseValue(Script.java:267)
at dk.hkj.script.Script.parseBitOp(Script.java:316)
at dk.hkj.script.Script.parseProduct(Script.java:388)
at dk.hkj.script.Script.parseSum(Script.java:470)
at dk.hkj.script.Script.parseCompare(Script.java:532)
at dk.hkj.script.Script.parseLogical(Script.java:561)
at dk.hkj.script.Script.parseQuestionMark(Script.java:587)
at dk.hkj.script.Script.parseExpression(Script.java:612)
at dk.hkj.script.Script.expression(Script.java:1220)
at dk.hkj.devices.SetupFormats.calcEnable(SetupFormats.java:344)
at dk.hkj.devices.SetupFormats.enableItems(SetupFormats.java:332)
at dk.hkj.main.PopupSetupSelection.initialSync(PopupSetupSelection.java:125)
at dk.hkj.main.PopupSetupSelection.timerUpdate(PopupSetupSelection.java:131)
at dk.hkj.main.PopupSetupSelection.access$3(PopupSetupSelection.java:129)
at dk.hkj.main.PopupSetupSelection$3.actionPerformed(PopupSetupSelection.java:88)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Any thoughts?
[Edit: I should also mention that I tried:
:enable: Ch2Setup.Trigger!="TINT"
That gave no Java error, but the :enable: does not change states.]