I have a script that popups a confirmation window at the beginning of the script and run the remaining code after approve it. I need to close the popup after the approval and run in the background the remaining actions. I must need to close it because the code has some Retries to check some sets in a table and it takes more that 10 seconds after finish it. Is it possible to do that? Here is the confirmation Dialog with the code configuration:
I tried to clear the dialog but it doesn't work. Also the Exit option from IEngine is not possible as it will abort the script (and we don't need that). I also tried with the InteractiveController but didn't find a method/action to close the popup window.
As far as I'm aware, it's currently not possible to close the popup window of an interactive automation script. This is by design, the window remains open while the interactive script is running.
A first option that could be tried, is starting a background task before the script is ended. This task will keep running in the background, even when the script has ended. This is not ideal because maybe not all actions on the engine object will still work properly. When no further interaction with DataMiner is needed, this method can be used without problems.
Alternatively, a non-interactive subscript could be started (asynchronously) that performs the actions in the background. This can be done using the following method: https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Automation.Engine.PrepareSubScript.html. This is probably the preferred approach, although it's a bit more work to implement.