kevin123 - 2024-01-26

I am trying to do "update device" in a project which was saved in a different version of CODESYS using ScriptEngine,
a dialog with 'Yes' and 'No' button popped up showing that
"Do you want to upgrade the storage format for this project?
-if you click 'Yes', storage format will be upgraded...
-if you click 'No', storage format will not be changed..."

I have to click the 'Yes' button automatically by scriptEngine.
I know from others topics here in forum, that some dialogs can be auto-answered using system.prompt_answers. And I also get the messagekey of this dialog:
Key: "<< No Key>>" Message: "Do you want to upgrade the storage format for this project? - If you click 'Yes',...

i have tried using the system.prompt_answers command below, but the dialog was not auto-answered.

system.prompt_answers["<<No Key>>"] = PromptResult.Yes

Does someone know how to auto-answer the dialog using system.prompt_answers command with messagekey"<< No key>>"? or any suggestions to solve this issue, Thanks!

 

Last edit: kevin123 2024-01-26