[Date Prev][Date Next][Subject Prev][Subject Next][Date Index][Subject Index]

Using Start in Win 95/98/NT



The usual way to start a program from within XyWrite is to shell out to dos
and run the program. In Win, you can even start Windows programs from the DOS
box.

One problem I've run into is that XyWrite keeps running too - sometimes my
routines would kill a temp file before a Windows file could open it. Example:
Convert a Xy file to a temporary file in RTF format, shell to DOS to start
WordPad with the RTF file as the argument, and then issue an XPL command to
kill the temp file. Problem: I was killing the temp file before WordPad could
finish loading.

My original solution was to put in a pause in the XPL routine after
DOS/nv/x/z /c "c:\[path]\[filename]"

New solution: DOS/nv/x/z /c START/w "c:\[path]\[filename]"

Start/w forces the [filename] being executed to complete its execution before
handing control back to XyWrite.

You can also use Start/w in commands that launch programs from within batch
files.

Another hint about using batch files: Create a shortcut to the batch file
Right-click on the shortcut and click on Properties. You can then choose a
new icon, rename the shortcut, and indicate (on the Program tab) Run
minimized and Close on exit. There are other advanced settings, but these
will get the batch file to run invisibly and disappear automatically when
it's done its work. Batch files may be useful for spawning processes from
within XyWrite, or for starting XyWrite itself with different argument
parameters.

Tim Baehr
tbaehr@xxxxxxxx