Hi HKJ,
My last question for the moment; I had a look at the devices with #otherFunc implementations and tried to make one myself.
However Java was not very happy with me

Modifying the statements from the KeysightU1461A gave me a response, but any addition ended in Java errors
I use syncPopups and syncPopups() with no luck.
#otherFunc
if (popupShowQuestion("Recall internally stored Instrument State","ok","Load","Cancel"))
deviceWrite(handle,"VKEY_VALUE,4,STATE,1;[*OPC];VKEY_VALUE,70,STATE,1;[*OPC]");
deviceWrite(handle,"VKEY_VALUE,175,STATE,1;[*OPC]");
deviceWrite(handle,"VKEY_VALUE,13,STATE,1;[*OPC]");
syncPopups();
endif
Resulted in:
;; SDG2122X: Tx <VKEY VALUE,4,STATE,1>
;; SDG2122X: *OPC waited: 44ms
;; SDG2122X: Tx <VKEY VALUE,70,STATE,1>
;; SDG2122X: *OPC waited: 158ms
;; SDG2122X: Tx <VKEY VALUE,175,STATE,1>
;; SDG2122X: *OPC waited: 75ms
;; SDG2122X: Tx <VKEY VALUE,13,STATE,1>
;; SDG2122X: *OPC waited: 191ms
dk.hkj.script.ProgramExceptions$UnknownException: Function not found syncPopups
;
deviceWrite(handle,"VKEY_VALUE,175,STATE,1;[*OPC]");
deviceWrite(handle,"VKEY_VALUE,13,STATE,1;[*OPC]");
syncPopups();____<----____
endif
at dk.hkj.script.Script.getFunc(Script.java:93)
at dk.hkj.script.Script.parseValue(Script.java:268)
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.statement(Script.java:1099)
at dk.hkj.script.Script.doExecute(Script.java:1250)
at dk.hkj.script.Script.execute(Script.java:1270)
at dk.hkj.script.Script.execute(Script.java:1276)
at dk.hkj.main.DeviceInterface.otherActionsBackground(DeviceInterface.java:943)
at dk.hkj.main.DeviceInterface.access$5(DeviceInterface.java:923)
at dk.hkj.main.DeviceInterface$10.run(DeviceInterface.java:917)
Replacing popupShowQuestion by popupCombo did not work at all.
#otherFunc
var instrumentState = "STATE01";
popupCombo("Recall internally stored Instrument State", instrumentState, "STATE01, STATE02, STATE03", "Recall pre-stored C:STATExx.XML files");
var clicks = listIndex(instrumentState,"STATE01 STATE02 STATE03"," ");
deviceWrite(handle,"VKEY_VALUE,4,STATE,1;[*OPC];VKEY_VALUE,70,STATE,1;[*OPC]");
for i=1 to clicks do
deviceWrite(handle,"VKEY_VALUE,175,STATE,1;[*OPC]");
endfor
deviceWrite(handle,"VKEY_VALUE,13,STATE,1;[*OPC]");
syncPopups;
Resulted in:
dk.hkj.script.ProgramExceptions$UnknownException: null
rnally stored Instrument State", instrumentState, "STATE01, STATE02, STATE03", "Recall pre-stored C:STATExx.XML files");____<----____
var clicks = listIndex(instrumentState,"STATE01 STATE02 STATE03"," ");
deviceWrite(handle,"VKEY_VALUE,4,STATE,1;[*OPC];
at dk.hkj.script.Script.doExecute(Script.java:1265)
at dk.hkj.script.Script.execute(Script.java:1270)
at dk.hkj.script.Script.execute(Script.java:1276)
at dk.hkj.main.DeviceInterface.otherActionsBackground(DeviceInterface.java:943)
at dk.hkj.main.DeviceInterface.access$5(DeviceInterface.java:923)
at dk.hkj.main.DeviceInterface$10.run(DeviceInterface.java:917)
Caused by: java.lang.NullPointerException
at dk.hkj.script.FunctionsPopup$15.execute(FunctionsPopup.java:455)
at dk.hkj.script.Script.parseValue(Script.java:269)
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.statement(Script.java:1099)
at dk.hkj.script.Script.doExecute(Script.java:1250)
... 5 more
There are not enough examples to find the right answers. Please correct my second example so I can run it.
Some guidance on this subject is highly appreciated.