and setting a Hotkey for it might work - the dialog opens showing the state it was last closed in (so collapsed groups will be collapsed and the last script used highlighted)
Thank you, @galaxyhub, for the suggestion, but perhaps I wasn't clear enough: By "script dialog" I was not referring to the Scripts Preferences but rather to a dialog i created in my own script and then opened with dlg.Show()...
Thank you for the suggestion. That's an interesting approach. I didn't realize what the purpose of the SendCustomMsg() return value was (it doesn't seem to be documented yet).
I had thought more along the lines of DOpus.dialogs or GetDialogs() but this will keep users from opening the same dialog again and instead show the existing one.
Also, I think I might add a general CustomMsg I can broadcast to all my (major) dialogs and set the focus back on whichever I'm currently working with. I'm constantly Alt+Tabbing and Ctr+Tabbing between windows and it's a little frustrating to have a dialog sitting there right in front of me, unreachable via the keyboard. So near and yet so far...
Meanwhile I experimented a bit and found that the suggested dlg.top = true doesn't work - or rather, it brings the dialog to the front but it doesn't focus it. I then tried some stuff and found that if I change the focus inside the dialog to a different control, the dialog is brought to the front and focused. No "top" needed. I don't really want to change the focus, but for now it's great. And with 13.8.1 just around the corner...