druck <
ne...@druck.org.uk> wrote:
[...]
> A suitable long wait to allow Fireworkz to start, display its splash
> screen and finish loading and displaying the first file, will allow the
> second file to load without errors.
Indeed. Rather than use a timed delay - which are fine until something
causes things to take a bit longer, while a five second delay remains a five
second delay - a quick check reveals that there is a slightly better
approach which may work.
For both Fireworkz and Fireworkz Pro the splash screen is displayed by a
separate program, which is run before the main application and registers a
slightly different name with the wimp.
So rather than use WaitUntil's "Elapsed" condition, its "Running" condition
might be usable. It certainly should be for Fireworkz Pro, because
(usefully) the splash screen program registers as "FireworkzPro Splash" -
with no space before the "Pro". So for that version of Fireworkz this should
work:
<filer_run the first file>
WaitUntil Running "Fireworkz Pro"
<filer_run the second file>
For the non-pro version, it's not so easy - but something like this might do
the trick:
<filer_run the first file>
WaitUntil Running Fireworkz
WaitUntil !Running Splash
<filer_run the second file>
The first WaitUntil delays continuation of the obey file until it detects
that there's an app running whose registered name includes "Fireworkz" -
which would be the splash screen program ("Fireworkz Splash"). Once that
condition is met, the second one comes into play and delays things until
there is *not* a program running that includes the word "Splash" in its
registered name.
The combined effect is that the obey file is paused while the splash screen
is loaded and is running, and continues when it quits. Note that the first
WaitUntil checks for "Fireworkz" rather than the word "Splash". If it
checked for the latter, and Fireworkz happened to be already loaded, it
would be a long wait.
That seems to work here - but none of my example files are particularly
large or complicated; if that does have a bearing then inserting a third
WaitUntil line, repeating what's in the first, should solve it.