Hi,
is there a way for a custom trigger script to first check if a certain script that is currently running finished?
Thank you.
Custom trigger
Moderators: JRL, Dorian (MJT support)
I have it in my local help. Using v12.1.3...It wasn't in my local help file...
As far as I know WaitProcessTerminated> would work well for compiled scripts but might not work so well with uncompiled scripts since all uncompiled scripts run under the msched.exe process.
Methods I've used require that script "A" provide script "B" with a detectable device. Script "A" might have an open dialog that is located well off the desktop, that can be detected by script "B" as an open window. When the window closes, script "A" has finished. Another method would be that script "A" creates a file just before closing and script "B" waits for the existance of that file. There are other methods that are more complicated such as placing info into the clipboard or using API functions but my favorite is the off screen dialog because it is easy and reliable. For example:
Script "A"
Code: Select all
Dialog>Dialog1
Caption=Really odd and easily distinguished window name
EndDialog>Dialog1
MoveWindow>Really odd and easily distinguished window name,-32000,-32000
Show>Dialog1
///The rest of script "A"
Code: Select all
WaitWindowOpen>Really odd and easily distinguished window name
WaitWindowClosed>Really odd and easily distinguished window name
///The rest of script "B"