script window show-hide
Edpa
Posts: 46
Hi!
When you work with the script dialog box, the work in the DAZ is blocked until you close the script or hide the window.
When the script window is hidden (but not closed), then you can work in the DAZ. OK.
Does anyone know how to call the dialog window back from the DAZ - dialog.hide() =>dialog.show() .
Buttons, keys and so on ... I know now the option with a timer only.
Comments
Rob goes into some detail here https://www.daz3d.com/forums/discussion/comment/657812/#Comment_657812 , see also https://www.daz3d.com/forums/discussion/65903 and https://www.daz3d.com/forums/discussion/82326 . Do note the warnings, however.
Richard Haseltine, thanks. I'll see this
It's strange that I didn't see it :)
My question this is the answer. To use show () instead exec() and welcome to DAZ panes.
OK,we will be more careful :)
But how return to the script after hide()- I now do not know yet:))
It's strange, but if you write in the script " var mod = new DzDialog ()" , the window will not open.
Rob says
I wrote variable "mod" in one case, in another "var mod" ( variable declaration).
I get different results in both cases
...
hmm lets try to get the links again
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/language_reference/start
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/language_reference/declarations/start
Something went wrong with my copy/pasting methinkest.
Yes, now it's fine :)
I know this is an old thread. I am also new to DazScript and even Javascript. But the var or lack thereof is just referencing that the variable is now global? I tried the keyword "global" that javascript has, it doesn't seem to work (nor does "let" but "const" seems to work.)
Also while have someones ear do the "hello = () =>" and the spread functions work in the particular version of QTscript that DZ4.12 has?
I am trying to create my own panel of commonly used functions, but for that It would need to be modless. Clearly this is an unwanted end as it created pointless loop.
I don't even really need this functionality I just wanted a window open so I could hit various buttons when I chose to run scripts without "file-> load script -> directory acess -> execute"
I think there is a way of attaching a script to a key shortcut, but usually I forget which keys are which, so a visual interface is what I need.