I created a dialog which ask if the selected file shall be deleted (after extracting the file - so the idea is to have the deletion in one button).
Better would be if the name of the file would be displayed. Similar to the standard delete dialog from Opus.
instead of an own dialog. Then Opus ask if it shall delete the file and afterwards the script continues.
(I have to check if the syntax is right. In the first step I simpy removed the QUIET' from cmd.RunCommand('Delete FILE="' + item + '" QUIET');
But anyway it would nice to now if it is possible to show a file name in a dialog.
There is first the above mentioned dialog which ask for deletion and later after extract and deletion is done there is a warning dialog, which informs the user, when also non-archive-files were selected.
v2022.02.12a is with Dlg.Show for the warning dialog at the end, which does not show up (or is closed immediately without user input)
So it is not the same Dlg object as far as I understand it. And it is not detached (or is the setting from previous dialog global?) - then the dialog would close immediatly acc. to the manual when using Dlg.Show.
EDIT: Ah, the detach topic seems to be relevant.
When I set detach to false for this dialog it works with show.
If you weren't aware, this is Objected-Oriented Programming (OOP) you've just discovered. It's beyond the scope of this forum to discuss how it works in detail. In short, objects (what you referred to as a variable) can have properties and methods. Properties are generally things you can look at or change and methods are things you do to that object. Dlg2 in your last code sample is an object. Dlg2.Show is a method.
If you (or anybody else reading this) have not experienced OOP, I'd suggest reading up on it.