DemoGL::Reference::Functions::DEMOGL_ExecuteCommand

DEMOGL_ExecuteCommand

DEMOGL_ExecuteCommand executes a script command. It uses the same syntax as is used in the application script and on the input prompt.

void
DEMOGL_ExecuteCommand(
	const char *pszCommand
);
	
Parameters.
pszCommand
Pointer to a zero-terminated string which represents the command which should be executed. This command is fed to the same parser that also parses the application script lines, so the syntax used in those lines should be used in the command pointed by pszCommand, with one exception: the timespot should be omitted.

Return values.

Remarks.
This function can be called before the application is started though it's mostly used to execute script commands to control effect classes from code instead of from an application script. When the command failes or generates an error, this is logged on the console. The command is executed immediately and not embedded in the timeline for execution. Therefor the timespot in the command should be omited.

Correct syntax would be:

	OBJECTNAME;Command;parameters;

Example.
// End the application
DEMOGL_ExecuteCommand("_SYSTEM;END;");
	

Requirements.
DemoGL v1.3 (build 0112 or higher)

See also.
_SOUNDSYSTEM commands, _SYSTEM commands, Effect object commands

Last changed on 20-jan-2001

©1999-2001 Solutions Design