i got an issue, in my script im executing running of new instance with following code
Set oShell = CreateObject("WScript.Shell") oShell.Run """"& cDiademExePath &""" /CScriptStart('" & sScriptToRunPath & "')", 7
Second Diadems opens, but its active and i would like it to be minimized and that the main instance remains active.
By this documentation ( Run Method (Windows Script Host) ), the second parameter controls the behaviour, but it has note "Note that not all programs make use of this information." - Is it this the case?
Is the re some other way to have the new instance minimized, or is there a way to have it not displayed, set visible of the instance to false?
Thanks for info
Solved! Go to Solution.
There may be a way to include a DOS extension specific to DIAdem to launch invisibly, but that may not be the best solution for what you want to do. What do you want to do? Are you launching a new DIAdem instance from an existing instance? In that case you might want to explore the option of invoking "worker" DIAdem instances that are by nature invisible (and lower memory footprint) and which can be controlled by the calling parent DIAdem instance. Or are you launching a new DIAdem instance from another program? In that case you might want to consider using the DIAdem ActiveX interface, which has a native flag to run invisibly, and again the calling program can exert control over the executing DIAdem instance.
If you launch DIAdem with a DOS shell command, as you've set out in your post, you will be launching a separate thread, such that if the calling program ends, the DIAdem instance will remain. This may be exactly what you want, but it comes at the cost that the calling program can no longer control the independently launched DIAdem instance. You can tell the DIAdem instance you're launching this way to run a particular VBScript as soon as it launches, and that VBScript can of course minimize the DIAdem application or perform any other tasks you want the independent DIAdem instance to do. But the communication between the calling program and the new DIAdem instance ends at launch time.
DIAdem Product Support Engineer
I am calling the run command from script which is running from Diadem.
I want to do exactly this:
- run a script which collect data from user
- after having data, i want to run a new instance of diadem which will do some operations, but the main script should continue doing other operations. the point is when i run a new instance, its active and i cant see the main script running, so i want to do that the new instance should be visible, but minimized and the main script should stay active.
now the main script opens new diadem and i see loading screen and after the new instance, i would like it to be minimized from its launch.
It sounds like you should be using one or more DIAdem "workers". What version of DIAdem are you running again?
DIAdem Product support Engineer
If you're using DIAdem 2014 or later, check out the following 2 objects to see how to use DIAdem "workers"
DIAdem Product Support Engineer
im using Diadem 2017 64bit and i solved it by putting
on the beginning of "slave" script runned in second diadem, but running diadem with some parameter which will make it minimalized directly before the loading screen of Diadem would be more elegant, because now i see the loading screen and after its loaded, it gets minimalized.