Chapter 9 Generation Reference Guide (GTL)


execute_command macro

This macro is used to launch executables as separate processes. It is available to execute generation commands only, and may be used in addition to standard GTL macros when defining commands.

.execute_command '(' <cmd> [',' <args> [',' <mode>]] ')'

Parameters

Parameter Type Description
<cmd> Simple template (escape sequences ignored) Executable path
<args> (optional) Simple template (escape sequences ignored) Arguments for the executable
<mode> (optional) cmd_ShellExecute or cmd_PipeOutput cmd_ShellExecute runs as independent process
cmd_PipeOutput blocks until completion, and shows the executable output in the output window

Note that if an .execute_command fails for any given reason (executables not found, or output sent to stderr), the command execution is stopped.

Example:

.execute_command(notepad, file1.txt, cmd_ShellExecute)

 


Copyright (C) 2005. Sybase Inc. All rights reserved.