Zeus Productions Banner

zLaunch™ for Windows

User's Guide



Copyright © 1996-1997. Zeus Productions. All Rights Reserved.
Written by Bruce A. Epstein
(This document last revised September 1, 1997)

If you are reading this document off-line, the latest version of this User's Guide
can be found on our web site at http://www.zeusprod.com/doc/zlwguide.html.

Refer to the Tech Alerts at http://www.zeusprod.com/products/alert.html for late-breaking solutions/updates involving zLaunch and other Zeus Products.


Welcome!


Thank you for your interest in zLaunch for Windows, one of the many utilities for Macromedia Director available from Zeus Productions. Please visit our web site for more information on our products for both Mac and Windows and custom development services.


zLaunch seamlessly launches other applications from Director:

Then zLaunch is for you! If you are not sure if zLaunch is appropriate for you, consult our Needs Analysis FAQ.

If you have purchased zLaunch for Windows, this package contains everything you need to run zLaunch under both Windows 3.1 and Windows 95 using using Director 6.0 (Director 4.0.4 and 5.0.1 are also supported).

zLaunch is also available in a Macintosh/PowerMac version, sold separately. The zLaunch for Macintosh User's Guide is included in this package as well.

If you are using the demonstration version of zLaunch for Windows, a warning dialog box will be posted when you start zLaunch. The release version (without the warning dialog) can be obtained by contacting Zeus Productions Sales at:

Be sure to download the latest End-User and Run-Time licensing agreements, as you are bound by these agreements if you use zLaunch. Note specifically that Run-Time distribution is royalty-free, but limited to five (5) commercial products per copy of zLaunch. Also note that you must include the Zeus logo and copyright information in your product(s). Refer to the licensing information included with this package, or licensing information on our web site for complete details.



For Technical Support:



Table of Contents

1. zLaunch for Windows

2. Installing and Using zLaunch

3. Creating your Projectors

4. Passing Parameters to zLaunch

5. zLaunch Parameters

6. Sample Lingo Code

7. Trouble-Shooting

8. Debugging FAQ





1. zLaunch for Windows

A. Introduction

We know that zLaunch will help you to use external applications with Director and we hope that you find zLaunch easy to use.

This User's Guide, the zLaunch FAQs and the example Director movie have been heavily revised.
Even if you are familiar previous versions, you will benefit from numerous additional tips and trouble-shooting hints provided throughout this guide. The latest versions of the Zeus TechNotes cited throughout this publication are available on our web site where you'll also find the latest zLaunch product information.

When viewing the latest version of this User's Guide on our web site, all hyperlinks will access the latest information. When viewing this HTML file locally on your machine, some hyperlinks will not work. For example, the links to glossary terms are only available on our web site.

Also note that when viewing this documentation on a Windows 3.1 machine, the enclosed ".html" files may appear with an ".htm" extension. Because the hyperlinks are looking for ".html" files, they won't work. You can access the ".htm" files by opening them manually from within your browser, or double-clicking them in the File Manager (or File Explorer).

B. zLaunch Product Features


zLaunch facilitates launching executables from Director. It allows you to quit Director, so you can launch demos even in low RAM situations, and then restart Director when the launched executable completes.

While the launched application is running, zLaunch's desktop cover remains in effect, similar to a Projector running in "full-screen" mode.

zLaunch allows you to use Director as a front end to a software sampler or other executables such as demos, ReadMe files, Acrobat PDF files, or a web browser.

zLaunch allows you to:

zLaunch is truly amazing, and is available for both Windows and Macintosh (sold separately).

C. Latest Features in zLaunch for Windows


Version 2.0 of zLaunch for Windows offers these new capabilities:



2. Installing and Using zLaunch



zLaunch for Windows consists of two separate executables, ZLNCH16.EXE (the 16-bit version) for Windows 3.1 and ZLNCH32.EXE (the 32-bit version) for Windows 95.

Throughout this documentation we will refer to the 16-bit version as "zLaunch16" and the 32-bit version as "zLaunch32" when necessary to distinguish between the two versions.

zLaunch does not require a formal installation procedure. Simply include zLaunch16 and/or zLaunch32 in the same folder as your Director movie and/or Projector from which it is called. zLaunch can reside in any folder, but it is easiest if it is in the same folder with the Director movie during development or your Projector during run-time.

zLaunch can run from either a hard drive or a CD. There is no need to copy it into the Windows System directory, or similar requirement.

If you are using the configuration file method to pass parameters to zLaunch, be sure to include your INI file in the same folder with zLaunch. If you are using the parameterList method, you do not need any other files besides zLaunch.

A. Note for Users Upgrading from Prior or Demo versions of zLaunch

B. zLaunch under Windows 3.1


ZLNCH16.EXE (which is the 16-bit version) should ALWAYS be used when running under Windows 3.1. Note that you must use a 16-bit projector under Windows 3.1, and that only 16-bit applications are supported. zLaunch does not officially support 32-bit applications running under Windows 3.1 that make use of the Win 32S extensions.

C. zLaunch under Windows 95


ZLNCH32.EXE (which is the 32-bit version) should ordinarily be used when running under Windows 95.

Note that ZLNCH32.EXE is used even when running a 16-bit projector and/or launching a 16-bit application under Windows 95. ZLNCH32.EXE automatically deals with the launched application whether it is a16-bit or 32-bit executable.

Some 16-bit applications that do not behave properly under Windows 95, may benefit from using the 16-bit version (ZLNCH16.EXE) instead. Contact Zeus Productions if you are having trouble.

NOTE: Under Windows 95, when using a 32-bit projector, you must set any external Director of Cast file (DIR, DXR or CST files) to "Read-Only" to prevent a file error when returning to your projector from zLaunch. Refer to the Zeus TechNote, "Solving Protection Violation Errors".

D. zLaunch under Windows NT


zLaunch is not currently officially supported under Windows NT, but may work with Windows-compliant 32-bit applications. Follow the instructions for using zLaunch under Windows 95, and please report any issues to Zeus Productions. Some users have reported that zLaunch will launch an application and then immediately return to the Projector under Windows NT 4.0. Using the new "TITLE1" parameter (see below) in zLaunch v2.0 may solve this problem.

E. Note for zLaunch for Macintosh Users


Due to differences between the two operating systems, there are some notable differences between zLaunch for Macintosh and zLaunch for Windows. Be sure to consult the example Director movie, and the zLaunch for Macintosh user's guide separately for details. Please note:




3. Creating your Projectors


You can use zLaunch with Director 4, Director 5, or Director 6. When you create your projector, you should use the "Animate in Background" option, accessible via the "Options..." button in the "Create Projector" dialog box. Failure to do so may prevent your projector from quitting once you luanch zLaunch.

A. Director 4.0 Projectors

When using Director 4.0, upgrade to Director 4.0.4, which fixes numerous bugs especially under Windows 95. Be sure to complete the update properly, as an improper updating of resource files can lead to faulty projectors.

Refer to the Zeus TechNote, "Creating Projectors for Macintosh and Windows", for details on the different projector types.

Director 4.0.4 can only create 16-bit projectors, which will work with zLaunch under both Windows 3.1 and Windows 95. Even though you run the same 16-bit projector under Windows 3.1 and Windows 95, you should still use the appropriate version of zLaunch for the currently running OS (ZLNCH16.EXE for Windows 3.1 and ZLNCH32.EXE for Windows 95).

Refer to the discussion below and to the Zeus TechNote, "Detecting the Playback Platform at Run-Time", for complete details on projector options regarding detection of the correct Windows OS version.

B. Director 5.0 Projectors

When using Director 5.0, upgrade to Director 5.0.1, which fixes some bugs in Director 5.0. Be sure to complete the update properly, as an improper updating of resource files can lead to faulty projectors.

If using FileIO, obtain the latest version of the FileIO Xtra, as the one that shipped with Director 5.0 was a beta version and had numerous bugs.

Refer to the Zeus TechNote, "Creating Projectors for Macintosh and Windows", for complete details on projector options

Director 5.0 and later can create either 16-bit or 32-bit projectors. The projector type is set by hitting the "Option" button in the "Create Projector" dialog box.

To create a 16-bit projector, choose the "Windows 3.1" type.

To create a 32-bit projector, choose the "Windows 95/NT" type.

You can create either a single 16-bit projector for use under both Windows 3.1 and Windows 95, or you can create two separate projectors.

Note that 32-bit projectors will not run under Windows 3.1, and that there is no way to create a combined "Fat Binary" projector as is possible on the Macintosh.

Refer to the discussion below and to the Zeus TechNote, "Detecting the Playback Platform at Run-Time", for complete details on projector options regarding detection of the correct Windows OS version.

C. Director 6.0 Projectors


Zeus Productions has made every effort to test zLaunch with Director 6.0, although it is always possible that new issues arise with the new version of Director. If you are aware of any such issues, please send e-mail to Zeus.

Refer to the Zeus TechNote, "Creating Director Projectors for Macintosh and Windows", for complete details on projector options.

D. Creating a Stub Projector


A "Stub Projector" is a small projector that references external assets, including external DIR or DXR files. Stub Projectors are STRONGLY recommended. Refer to the Zeus TechNote, "Creating and Using Stub Projectors", for complete details on creating stub projectors.



4. Passing Parameters to zLaunch

To use zLaunch under Windows, you specify the parameters needed to launch your particular application and to relaunch the projector.

There are two different ways to pass parameters to zLaunch, and the most convenient method depends on your particular requirements and Lingo skills:

To initiate zLaunch, use Lingo's "open...with" statement. zLaunch automatically determines which method you are using to pass parameters. If the first item you send zLaunch is the name of an INI file, then zLaunch assumes you are using the INI file method, otherwise it assumes you are using the parameterList method. You can use one or both approaches, to launch different executables from the same Projector.

In either case, you provide the same parameters to zLaunch (you can omit some parameters from an INI file, but they are all required when using a parameterList). The two different methods are simply provided for convenience.

NOTE: Due to differences in the operating systems, zLaunch for Windows uses a different method than zLaunch for Macintosh to specify its parameters. The format of the Windows configuration (INI) file is different than the format of the Macintosh configuration file. Furthermore, you can not use the parameterList method with zLaunch for the Macintosh. Refer to the zLaunch for Macintosh User's Guide.

A. Using the INI (Configuration) File Method

The "Configuration File" method uses an INI file to pass parameters to zLaunch. It is easiest, but not mandatory, if this INI file is in the same folder with zLaunch and the projector. The format of the configuration file follows the standard Windows conventions for INI files. Refer to the TechNote, "Windows INI Files" for additional details.

If the first item you send zLaunch is the name of an INI file, then zLaunch assumes you are using the INI file method, otherwise it assumes you are using the parameterList method.

This configuration file method has the following advantages:


Remember that you can mix and match the configuration file method and the parameterList method in the same project. Use whichever is easiest in each individual case.

A.1 - Format of the INI File

Within the INI file, you must create one or more section headings in brackets. Each section can be used to launch a different application with zLaunch. Within each section, you assign values for the parameters required by zLaunch. Refer to the example ZLAUNCH.INI file included with zLaunch for Windows.

NOTE: The TERMTASK and STARTTASK parameters are used only by zLaunch16, and will be ignored by zLaunch32. BACKGROUND, RED, GREEN, BLUE and TITLE1 are optional.

For zLaunch16, the syntax is:

[Win31sectionName]
EXE1=exeName optionalDocumentName
EXE2=exeName optionalDocumentName
or NONE
WDIR1=pathSpec
WDIR2=pathSpec
TERMTASK=taskName
or NONE
STARTTASK=taskName
or NONE
BACKGROUND=integer
(defaults to 1)
RED=integer (defaults to 0)
GREEN=integer (defaults to 0)
BLUE=integer (defaults to 0)
TITLE1=taskName (defaults to NONE)


NOTE: The DELAY1 and DELAY2 parameters are only used by zLaunch32, and will be ignored by zLaunch16. BACKGROUND, RED, GREEN, BLUE and TITLE1 are optional.

For zLaunch32, the syntax is:

[Win95sectionName]
EXE1=exeName optionalDocumentName
EXE2=exeName optionalDocumentName
or NONE
WDIR1=pathSpec
WDIR2=pathSpec
DELAY1=time
DELAY2=time
BACKGROUND=integer
(defaults to 1)
RED=integer (defaults to 0)
GREEN=integer (defaults to 0)
BLUE=integer (defaults to 0)
TITLE1=taskName (defaults to NONE)

A.2 - Calling zLaunch using the INI File Method

Once you have created the INI file, you can start zLaunch using a Lingo "open...with..." statement.

When using the INI file method, the Lingo statement takes the following form:


Where configFile is the name of the INI file, and Win31sectionName or Win95sectionName is the section heading within the configuration file (described below). In the above example, it is assumed that both the configuration file and zLaunch are in the same folder as your Director movie, as indicated by the Lingo property "the pathName".

B. Using the Parameter list Method

The "parameter list" method specifies the parameters to zLaunch in a string you build via Lingo. If the first item you send zLaunch is not the name of an INI file, then zLaunch assumes you are using the parameter list method, otherwise it assumes you are using the INI file method.


When using the parameter list method, the parameters must be passed in a specific order, and parameters may not be omitted.

The parameter list method has the following advantages:


Remember that you can mix and match the configuration file method and the parameterList method in the same project. Use whichever is easiest in each individual case.

B.1 - Calling zLaunch using the Parameter List Method

To pass parameters to zLaunch, you construct a parameter list and then pass the parameters to zLaunch using a Lingo "open...with" statement.

Note that the fifth and sixth parameters passed to zLaunch are different for the 16-bit and 32-bit versions.

When using the parameterList method, the Lingo statements takes the following form:

5. zLaunch Parameters

The new version of zLaunch has five additional parameters. If you are not already using the configuration file (INI file) method to specify the parameters, you should consider doing so. If you are using the parameterList method, beware of hitting the character limit (somewhere between 100 and 200 characters) when specifying them in a single parameter list.

The Delay1 and Delay2 parameters are used only by zLaunch32 and ignored by zLaunch16 if present in the INI file.

The TermTask and StartTask parameters are used only by zLaunch16 and ignored by zLaunch32 if present in the INI file.

A. Parameter Summary

The parameters required by zLaunch are outlined below. They are shown in the order in which they must be specified when using the parameterList method, and identified by the name used in the INI file method. For example, item "Exe1" in the INI file, corresponds to the first parameter when using the parameterList method. "Exe2" corresponds to the second parameter, etc.

The items in the parameter list are separated by commas. Each item must be in the expected position in the parameter list.

Refer to the examples to help clarify their usage


B. Detailed Parameter Description

This section describes each of the parameters required by zLaunch, regardless of whether you use the INI file method or the parameterList method to specify the parameters. The name of each parameter (if set via the INI file method) are shown. The items are listed in the order in which they must appear in the parameter list if using the parameterList method. Do NOT use quotes for the items in the INI file.

EXE1 (param1)

EXE1 (param1) is the name of the executable (application) to be launched, plus optional parameter(s) such as a document name to open. If including a document name, separate it from the application's name with a space. For Example:


Do not include the path, which is specified separately below in WDIR1 (param3), unless the path for the application and document are different. In that case, specify the complete path to the application. WDIR1 (param3) will be used as the path to the document:

EXE2 (param2)

EXE2 (param2) is ordinarily the name of your Director Projector that you want re-launched after the application specified in EXE1 (param1) terminates.


Do not include the path, which is specified separately below in WDIR2 (param4).

The application to be re-launched does not need to be the original projector. It could be a different projector or another executable entirely. For example, you could use zLaunch to first launch an installer, and then to launch the application it just installed. However, in this case, you would never return to the original projector.

As is the case with EXE1 (param1), you can specify the name of an executable, plus optional parameter(s) such as a document name to open. If including a document name, separate it from the application's name with a space.



NOTE:


WDIR1 (param3)

WDIR1 (param3) is the path to be used as the working directory for the launched application specified by EXE1 (param1).

Applications typically look in the "working directory" for external files such as graphics, data or configuration files. This parameter is used to ensure that the launched application can find the other files it may need to run. This is usually the same directory in which the application specified in EXE1 (param1) resides, or the directory where a document is located.

Refer to the TechNote, "Path and File Specifications" for more information about file paths and working directories.


.NOTE:


WDIR2 (param4)

WDIR2 (param4) is the path to be used as the working directory for the launched application specified by EXE2 (param2).

Director needs the "working directory" set to locate any external files in use by the Projector. This parameter is used to ensure that the re-launched Projector can find any files it may need to run. This should be the same directory in which the Projector, specified in EXE2 (param2) resides.

Refer to the TechNote, "Path and File Specifications" for more information about file paths and working directories.


NOTE:

TermTask or Delay1 (param5)

TermTask or Delay1 (param5 )- This parameter is used to help zLaunch wait for your projector to die before launching the executable specified in EXE1 (param1). This gives the Projector a chance to quit in order that it frees up RAM and releases system resources such as control over the palette.

Due to the inherent differences between Windows 3.1 and Windows 95, this parameter is different for the 16-bit and 32-bit versions of zLaunch. TermTask is used by zLaunch16, and Delay1 is used by zLaunch32.

If you are using the parameterList method, specify TermTask as the fifth parameter when using zLaunch 16 or DELAY1 as the fifth parameter when using zLaunch32 (not both). If you are using the INI file method, specify TermTask or Delay1, under the designated section heading of the INI file.

TermTask (param5) for zLaunch16

When using zLaunch16 (for Windows 3.1) the fifth parameter should be TermTask, which is the name of the projector for which zLaunch should wait to die, before launching the executable specified in EXE1 (param1).

Technically, this is the task name or "process" name for which zLaunch should wait to die, which is usually the name of your projector from which you are starting zLaunch. Do not include the Projector's ".EXE" extension or the path to as part of the parameter (process names don't include the path).

NOTE: Use the reserved word "NONE" (without the quotes) for this parameter, if you are NOT quitting the projector.

Delay1 (param5) for zLaunch32

When using zLaunch32 (for Windows 95) the fifth parameter should be Delay1, which is the time delay (in milliseconds) to wait to ensure that the projector dies, before launching the executable specified in EXE1 (param1). For example, a setting of 2000 (milliseconds) will cause zLaunch to wait 2 seconds before launching the external executable.

Earlier versions of zLaunch did not always accurately determine when a projector had released system resources. Because a process under Windows 95 may terminate, but the resources it used may not actually be freed by the system, Delay1 specifies an additional delay before launching the external application. This is especially helpful when launching 16-bit applications, which are handled differently than 32-bit applications by the Windows 95 process manager.

Start with a setting of 2000 milliseconds (2 seconds), and adjust as necessary.

StartTask or Delay2 (param6)

StartTask or Delay2 (param6 )- This parameter ensures that your projector, specified in EXE2 (param2), has been re-launched before zLaunch kills itself. This gives the external application a chance to terminate, free up RAM, and release system resources such as control over the palette. It then gives the projector a chance to start up while the desktop is still covered.

Due to the inherent differences between Windows 3.1 and Windows 95, this parameter is different for the 16-bit and 32-bit versions of zLaunch. StartTask is used by zLaunch16, and Delay2 is used by zLaunch32.

If you are using the parameterList method, specify StartTask as the sixth parameter when using zLaunch 16 or Delay2 as the sixth parameter when using zLaunch32 (not both). If you are using the INI file method, specify StartTask or Delay2, under the designated section heading of the INI file.

StartTask (param6) for zLaunch16

When using zLaunch16 (for Windows 3.1) the sixth parameter should be StartTask, which is the name of the projector for which zLaunch should wait to start up, before dismissing the desktop cover window and terminating itself. This should be the name of the Projector which you are re-starting as specified by EXE2 (param2).

Technically, this is the task name or "process" name which zLaunch should wait for to start up. Do not include the Projector's ".EXE" extension or the path to as part of the parameter (process names don't include the path).

NOTE: Use the reserved word "NONE" (without the quotes) for this parameter, if you are NOT quitting the projector.

Delay2 (param6) for zLaunch32

When using zLaunch32 (for Windows 95) the sixth parameter should be Delay2, which is the time delay (in milliseconds) to wait to ensure that the projector specified in EXE2 (param2) before zLaunch dismisses the desktop cover window and terminates itself For example, a setting of 2000 (milliseconds) will cause zLaunch to wait 2 seconds after relaunching the projector before terminating itself.

Because a process under Windows 95 may start up, but not actually take control of the screen, this parameter specifies an additional delay before zLaunch kills itself.

This parameter can be used to avoid, for example, the flashing desktop if zLaunch kills itself before the projector otherwise opens a window to cover the desktop.

The latest version of zLaunch does a better version of detecting when an application has posted a window to the screen, and typically does not require a significant additional delay. Try a setting of 2000 (two seconds), and adjust as necessary.

NOTE: Five new parameters have been added to the latest version of zLaunch for Windows. Users upgrading from earlier versions should include these new parameters. If omitted, the default values will be used.

Background, Red, Green & Blue (params 7 through 10)

Parameter 7 controls the presence of the background cover window, and parameters 8 through 10 specify the color of the background (if any), as an RGB (Red, Green, Blue) value. If Red, Green and Blue are all zeros, the cover window (if any) will be black. If Red, Green and Blue are all 255, the cover window (if any) will be white. If Red, Green and Blue are all equal, the cover window (if any) will be a shade of gray.

Background (param7)

Background (param7) determines whether zLaunch covers the desktop while the launched application is running. If this parameter is zero, zLaunch will not cover the desktop and the color parameters are ignored. Any non-zero value activates the background cover window whose color is determined by the Red, Green and Blue parameters. The default value for Background is 1, which activates the desktop cover window.

Red (param8)

Red (param8) specifies an integer between 0 and 255 which determines the red component of the cover window. Zero means "no red" and 255 means "very red". The default value for Red is 0.

Green (param9)

Green (param9) specifies an integer between 0 and 255 which determines the green component of the cover window. Zero means "no green" and 255 means "very green". The default value for Green is 0.

Blue (param10)

Blue (param10) specifies an integer between 0 and 255 which determines the blue component of the cover window. Zero means "no blue" and 255 means "very blue". The default value for Blue is 0.

Title1 (param11)

Title1 (param11) specifies a secondary process name to wait for, following termination of the launched application specified in EXE1 (param1). This parameter is new to the latest version of zLaunch for Windows, and handles situations where the launched application in turn launches a subsequent process.

If you have not been having problems, you should simply leave this parameter as NONE. You can omit if from the INI file, but be sure to include a comma as a placeholder if using the parameterList method:



If you are sure that your first six parameters are correct, but find that the projector specified by EXE2 (param2) restarts almost immediately after the external application specified by EXE1 (param1) is launched, it is possible that the external application is spawning a secondary process. In that case, determine the name of the spawned process using the ALT-TAB keys under Windows to see the active processes. The process name may also appear in the title bar of the application's window. Pressing CTRL-ALT-DEL once should bring up a list of running processes. Processes such as "Systry", "Pout", "Atinit" and "Explorer" are part of Windows 95, not your launched application. Hopefully, the process of interest should be evident from the list.

Once you have determined the name of the spawned process (which should not be case sensitive), you can compensate for the problem, by setting TITLE1 as follows:

If it appears that multiple processes are being spawned, zLaunch may not be able to properly wait for the executable. Try setting Title1 (param11) to the name of the last process in the line line of spawned processes.


6. Sample Lingo Code


Now that we have examined each parameter in detail, let's look at an example. Consult the sample Director movie for a full-blown example using both zLaunch for Macintosh and zLaunch for Windows.

A. INI File Method Example


This example Lingo code shows how to call zLaunch when using the INI file method. If the first item passed to zLaunch is an INI file name, it assumes that you are using the INI file method.

A1. Sample INI File


Let's assume that we have created the following configuration file with a text editor and named it "ZLAUNCH.INI"

NOTE: The TERMTASK and STARTTASK parameters are used only by zLaunch16, and will be ignored by zLaunch32. TITLE1, BACKGROUND, RED, GREEN and BLUE are optional. Here they are used to create a bright green background.

[Win31demo]
EXE1=DEMO31
EXE2=MyProj
WDIR1=\Demos\Demo1
WDIR2=\
TERMTASK=MyProj
STARTTASK=MyProj
BACKGROUND=1
RED=0
GREEN=255
BLUE=0
TITLE1=NONE

NOTE: The DELAY1 and DELAY2 parameters are used only by zLaunch32, and will be ignored by zLaunch16. TITLE1, BACKGROUND, RED, GREEN and BLUE are optional. Here they are used to create a bright blue background.

[Win95demo]
EXE1=DEMO95
EXE2=MyProj
WDIR1=\Demos\Demo1
WDIR2=\
DELAY1=1000
DELAY2=1000
BACKGROUND=1
RED=0
GREEN=0
BLUE=255
TITLE1=NONE


Following is a line-by-line explanation:

1) EXE1 - If you tell zLaunch16 to use the "Win31demo" section instead, the executable "x:\Demos\Demo1\DEMO31" (where x is the current drive letter) will be launched. If you tell zLaunch32 to read parameters from the "Win95demo" section, the executable "x:\Demos\Demo1\DEMO95" will be launched.

These files are assumed to be on the current drive, because no drive letter is specified. This is convenient when the executable is on the same drive as the projector, but you don't know the drive letter. (For example, the drive letter of a user's CD-ROM could be any letter).

You could also specify a drive letter explicitly, such as "c:\Demos\Demo1\MYDEMO"

2) EXE2 - The Projector "x:\MyProj" (where x is the current drive letter) will be re-launched when the external application terminates.

The Projector is assumed to be on the current drive, because no drive letter is specified. This is convenient when the you don't know the drive letter. (For example, the drive letter of a user's CD-ROM could be any letter).

You could also specify a drive letter explicitly, such as "c:\MyProj"

3) WDIR1 - "x:\Demos\Demo1\" (where x is the current drive letter) will be used as the working directory for the application specified by Exe1 (param1).

4) WDIR2 - "x:\" (where x is the current drive letter) will be used as the working directory for the projector being re-launched, as specified by Exe2 (param2).

5a) TERMTASK - zLaunch16 will wait for the process named "MyProj" (the original projector) to die before launching the application specified by Exe1 (param1).

5b) DELAY1 - zLaunch32 will delay 1000 milliseconds (1 second), before launching the application specified by Exe1 (param1).

6a) STARTTASK - zLaunch16 will wait for the process named "MyProj", the re-launched projector specified by Exe2 (param2) to start up before dismissing the cover window.

6b) DELAY2 - zLaunch32 will delay 1000 milliseconds (1 second), before launching the application specified by Exe1 (param1).

7) zLaunch covers the desktop with a green or blue window. See the Background, Red, Green and Blue parameters. Ordinarily you may omit these four items from the INI file or the parameterList and a black window would be used. Use "1,0,0,0" as placeholders in the parameterList when specifying a value for Title1, as in "...param6, 1, 0, 0, 0, TITLE1"

8) TITLE1 - zLaunch will not wait for any secondary process names (usually unnecessary). Ordinarily you may omit this parameter from the INI file or use "NONE" as a placeholder when using the parameterList method. Use "1,0,0,0" as placeholders in the parameterList when specifying a value for Title1, as in "...param6, 1, 0, 0, 0, TITLE1"

A2. Sample Lingo Code using the INI File


Here is a sample Lingo handler that uses a different section of the ZLAUNCH.INI file defined above depending on whether the 16-bit or 32-bit projector is being run. It is up to you to ensure that the 32-bit projector is being used under Windows 95. If not, you must make separate arrangements to ensure that the zLaunch32 is called when running under Windows 95. Refer to the TechNote, "Determining the Playback Platform at Run-Time"

Note that this example:


Refer to the example Director file for an example use of this code.

	-- Assume that the config file is 

	-- called "ZLAUNCH.INI" in the current directory

	set configFile = the pathName & "ZLAUNCH.INI"



	if the platform = "Windows,32" then 

	  -- 32-bit version 

	  open configFile & ",Win95demo" with the pathName & "ZLNCH32.EXE" 

	else 

	  -- We are running a 16-bit projector, presumably under Win 3.1 

	  open configFile & ",Win31demo" with the pathName & "ZLNCH16.EXE" 

	end if



	-- Quit the projector

	quit

B. ParameterList Method Example


This section shows a sample Lingo routine using the command-line method to specify the parameters.

	if the platform = "Windows,32" then 

	  -- 32-bit projector, uses zLaunch32



	  -- Create a string that holds the parameter list 

	  -- Note that parameters 5 and 6 are DELAY1 and DELAY2 

	  set parameterList = "MYDEMO DEMODATA, MYPROJ, \MYDEMOS, \MYFOLDER, 1000, 1000, 1, 0, 0, 0, NONE" 



	  open parameterList with the pathName & "ZLNCH32.EXE" 



	else

	  -- This is a 16-bit projector, presumably under Win 3.1 

	  -- zLaunch16 is not appropriate for Windows 95 



	  -- Create a string that holds the parameter list

	  -- Note that parameters 5 and 6 are TERMTASK and STARTTASK 



	  set parameterList = "MYDEMO.EXE DEMODATA, MYPROJ.EXE, C:\MYDEMOS, C:\MYFOLDER\ MYPROJ, MYPROJ, 1, 0, 0, 0, NONE" 



	  open parameterList with the pathName & "ZLNCH16.EXE" 

	end if



	-- Quit the projector

	quit


7. Trouble-Shooting


The first step towards fixing a problem is to determine its exact nature. To say "it doesn't work" is not very helpful. Try to narrow down the problem by determining what does work, which will leave you with a better understanding of where the problem lies. Refer to the TechNote, "Trouble-Shooting and Debugging" for an overview of the trouble-shooting process.

A. Verifying your External Application and Document

Before trying to launch an application from zLaunch, you should test it from the Windows Program Manager or File Explorer by double-clicking your application and verifying that it performs as expected.

If the application works, try double-clicking the document, if any, that you are attempting to open via zLaunch. Verify that it launches the correct application. Also, try opening the document from within the application using the "File...Open" command.

If the application and document do not work from Windows, they will not work with zLaunch. Refer to the TechNote, "Trouble-Shooting Applications" to identify possible sources of errors when working with documents.

If the application and document work successfully, try running them from the Windows "Run" dialog box. This is located under the Windows 3.1 Program Manager menu, or the Windows 95 Start Menu. Specify the command line in the form

applicationPath documentPath

Such as:

c:\acroread\acroread.exe c:\mydoc\test.pdf


B. Verifying the File Paths


If the application and its document work from the Windows desktop, but not with zLaunch, try starting them from Director's message window using Lingo's "open" or "open...with" command. (Note that the document name precedes the application name when using the "open...with" command, ).

For example, to verify that you have the correct path to Acrobat Reader, try opening it using something like:

open "c:\mydoc\test.pdf" with "c:\acroread\acroread.exe"

If it doesn't work, the most likely source of error is a syntax error or typo in your path specification, or the files do not exist in the specified location.

Refer to the Zeus TechNote, "Path and File Specifications" for details on specifying a Windows file path, and likely sources of error. Note that referring to a shortcut is not supported by zLaunch, and Windows 95 long file names should be avoided. Use DOS-style (eight-dot-three) file names and folder names if possible.


C. Verifying Operation with zLaunch from Windows


If you have determined the correct path to the application and the document, but can't get it to work with zLaunch from your Director movie, verify its operation with zLaunch from the Windows desktop to test your parameters in isolation of your Director Projector. If using the INI file method, create your INI file first.

Quit all other applications. Then, verify that zLaunch itself is working by running it from the Windows "Run" dialog box, located under the Windows 3.1 Program Manager menu, or the Windows 95 Start Menu.

Do NOT simply double-click on zLaunch to test it. This will fail because zLaunch is not receiving the necessary parameters.

Use the syntax that is appropriate for your version of Windows and consistent with the parameter-passing method you have chosen (INI file method or parameterList method). Note that the name of the executable (zLaunch) precedes the parameters, which is the opposite of the order used for the Lingo open command. Note also that there are no quotes around the parameters. The following assumes that you are testing from a folder called "test" beneath the root level of your hard drive.


zLaunch should attempt to launch the application specified by EXE1 (param1). It should then wait for that application to run, and re-launch the projector specified by EXE2 (param2).

zLaunch may not work with shortcuts or with hidden files. If you are using an shortcut or a hidden file, test it first with a normal file.

If this does not work, refer to the list of possible sources of error in section A, "Testing the External Application and Document", above. The most likely sources of error are:

D. Verifying your Lingo Code


Once you have verified that zLaunch works from the Windows Run dialog box, you can test it from your Projector. Common sources of error include:

8. Debugging FAQ

Below are listed some common problems, and their most likely solutions:

Refer to the Tech Alerts for late-breaking solutions/updates involving Zeus Products.
Problem: Under Windows 95, when using zLaunch32, it brings up a DOS Console window with the message, "This application does not run under DOS".

A.Your copy of zLaunch is corrupted. This is sometimes caused by the downloading or unzippping process, or by file transfers between computers, especially of different OS's, over a network.

If you hilight the corrupted file in your File Explorer and choose "File...Properties", and observe six tabs: General, Program, Font, Memory, Screen and Misc, this indicates that the executable is corrupted.

The File Properties Dialog of a valid version should show only two tabs: General and Version.

Contact Zeus Productions for assistance in obtaining or downloading a non-corrupted version.

Problem: Under Windows 95, when using a 32-bit projector, I get a file error (-49 or -51) when returning to my projector from zLaunch.

A.You must set any external DIR, DXR or CST files to Read-Only to prevent a file error when returning to your projector from zLaunch. Refer to the Zeus TechNote, "Solving Protection Violation Errors" for details.

Problem: zLaunch crashes immediately.

A. zLaunch will crash if you simply double-click it, because it needs a series of parameters that are not being provided to it.

You may be running the wrong executable, or there may have been a problem with the download. Make sure that you have a valid EXE by running it from the Windows 3.1 or Windows 95 "Run" dialog box (with the correct number of parameters).

You may have specified the wrong number of parameters, or parameters in the wrong order. Verify these by using a Lingo "put" statement to print out the parameters in the message window (see the startMovie handler in the example Lingo movie for testing it in debug mode)

The most common cause, however, is running the wrong version of zLaunch for your Windows OS. zLaunch32 will not run under Windows 3.1. Be sure to run the zLaunch32 under Windows 95, even when running from a 16-bit projector, as it is preferred over zLaunch16.

Be sure that you are using the correct parameters for zLaunch16 or zLaunch32. Parameters five and six are different for the two versions of zLaunch. (Refer to TermTask, StartTask, Delay1, Delay2)

The example Lingo code included in this package assumes that you are running a 32-bit projector under Windows 95. It relies on Lingo's "the platform" command which misleadingly returns "Windows,16" when running a 16-bit projector under Windows 95. Therefore, there is no way, via Lingo alone, to determine whether your projector is running under Windows 95.

For Director 6.0 (or 5.0.1), there are basically three ways to address the problem:

Problem: I am not sure when zLaunch is active, so I am not sure what is going on.

A.Set one of the color parameters, Red, Green, or Blue, to 255, and make sure that the Background parameter is set to 1. This will force zLaunch to use a brightly colored background window, which will make it easier to determine what is happening.


Problem: zLaunch never launches the first application.

A. Be sure that you Quit the projector after starting zLaunch with the Lingo "open" command. zLaunch may be waiting indefinitely for the projector to quit.

Also check that the name of the application to launch (EXE1) and working directory (WDIR1) are correct. You can verify this using the "Run" menu under Windows. Type in the complete path to the application to verify that you are using the correct path.

Problem: zLaunch displays an error dialog that says "Can't set Path to Path...."

A.Verify that you are using the correct path specifications for WDIR1 (param3) and WDIR2 (param4)

The latest version of zLaunch fixes a bug that occurred when setting the working directory to the root of the current drive under Windows 3.1, using the parameterList or an INI file with a statement of the form:

WDIR1=\
or
WDIR2=\

Upgrade to the latest version of zLaunch to solve the problem.

Problem: zLaunch never quits the projector

A.The problem is either a syntax error in your configuration file, a problem with you Lingo technique, or a problem with the way you built the projector.

Check the following:
Be sure that you use the Lingo "quit" command to quit the projector after starting zLaunch with the Lingo "open" command. zLaunch may be waiting indefinitely for the projector to quit. Note that zLaunch for Windows requires you to quit the projector via Lingo, whereas zLaunch for Macintosh accepts the projector name to be killed as a parameter.

When you create your projector, you should use the "Animate in Background" option, accessible via the "Options..." button in the "Create Projector" dialog box. Failure to do so may prevent your projector from quitting once starting zLaunch.

Problem: The projector restarts immediately after zLaunch launches the first application.

A.It is possible that the external application is spawning a secondary process and then terminating. zLaunch detects this termination and relaunches the projector. The latest version of zLaunch for Windows includes a new parameter (TITLE1) which is used to wait for a secondary process name.
zLaunch may not work properly with some applications that in turn spawn other applications and then quit themselves, especially if they spawn multiple processes. If so, try setting TITLE1 to the name of the last process that is spawned.

Problem: The application launches, but then it displays an error message that says it can't find some of its assets or components.

A. Be sure to set the working directory, WDIR1 (param3), correctly. Many applications look for their assets in the working directory. Test this by creating a Program Icon under Windows 3.1 or a Shortcut under Windows 95 and setting the working directory in its Properties dialog box. Use this icon to launch the application. If it works, then you have the correct working directory.

Prior versions of zLaunch may have issued this error message under Windows 3.1 if you set the working directory to the root of a drive (just a backslash "\"). The current version of zLaunch remedies this problem.


Problem: The Projector starts from the beginning. How do I restart the projector in the frame in which it left off?

A. A projector can only start at its beginning, but you can simulate a restart using the sample Lingo code in the ZLAUNCH.DIR example movie. It records the frame and movie name in a small text file, and restores the projector's position the next time it is run. You can use the savePosition() handler to store the projector position, and the restorePosition() handler to restore it.

You may need to store other data, such as global variables' values in the text file for later restoration. Refer to the example DIR file and the Zeus TechNote, "Restoring the Projector State" for more information.

It is generally a good idea to create stub projectors for all your projects. Refer to the Zeus TechNote, "Creating and Using Stub Projectors" for more information on stub projectors.


Problem: zLaunch16 works fine under Windows 95 for 16-bit applications but when launching 32-bit applications, the launched application gets put into the background instead of the foreground.

A.You should NOT be using zLaunch16 under Windows 95. Use zLaunch32 instead.

To clarify:


Problem: zLaunch works under Windows 3.1, but not under Windows 95, or vice-versa. I am using the same Lingo on both platforms.

A. Actually, the calling sequence for the two EXEs under Windows 3.1 and Windows 95 is slightly different. Specifically, the fifth and sixth parameters are different. Be sure to use the TermTask and StartTask parameters with zLaunch16, and the Delay1 and Delay2 parameters with zLaunch32. Refer to the detailed documentation, and the Director example movie.


Problem: I can't get the parameterList method working

A. Use the Lingo "put" command to print out the parameterList in the message window instead of launching zLaunch. Inspect the parameterList for possible errors and verify all the paths.

It is possible that your parameter list has become too lengthy for Windows to handle (between 100 and 200 characters). Try shortening the paths, or using the INI file method.

Problem: I can't get the INI file method working

A. Be sure that you are specifying the complete path to a valid INI file which contais the parameters under a proper section heading in square brackets. If you omit the section heading, zLaunch will fail. Specify DELAY1 and DELAY2 when using zLaunch32, and TERMTASK and STARTASK when using zLaunch16. Be sure that you are spelling the parameter names correctly. Note that "STARTTASK" has two Ts in the middle of the word. Refer to the sample INI file.

Q. What if I am still having problems?

A. If you are still having problems:

zLaunch is a general purpose product. As such, it is impossible to anticipate every conceivable use, or compensate for the behavior of some non-standard applications.

If you feel that you are using it correctly, and still having problems with zLaunch, please contact our technical support department. While we ask that you make a good-faith effort to define the problem, please don't wait until you are pulling your hair out to call us. We stand behind our products, and are happy to help you with any implementation questions

You can reach our World-Class technical support at info@zeusprod.com or 1-732-398-1682. We are very helpful.

Good luck in all your multimedia pursuits.

Zeus Productions


Copyright © 1996-1997. Zeus Productions. All Rights Reserved.
zLaunch is a trademark of Zeus Productions.

Last Revised: 09/01/97
###