Vcl.DdeMan.TDdeClientConv.ExecuteMacro

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ExecuteMacro(Cmd: PAnsiChar; waitFlg: Boolean): Boolean;

C++

bool __fastcall ExecuteMacro(char * Cmd, bool waitFlg);

Properties

Type Visibility Source Unit Parent
function public
Vcl.DdeMan.pas
Vcl.DdeMan.hpp
Vcl.DdeMan TDdeClientConv

Description

Sends a macro command string to the DDE server application.

Call ExecuteMacro to send a single macro command to the server application. To send multiple macro commands, use ExecuteMacroLines instead. ExecuteMacro returns true if the macro was successfully passed to the DDE server application. If ExecuteMacro was unable to send a command string, ExecuteMacro returns false.

Cmd is a null-terminated string that contains the macro to be executed by the DDE server application. The actual value of Cmd depends on the DDE server application. See the documentation of the DDE server application for the command strings it will accept.

WaitFlg determines if this DDE client should wait until the DDE server application finishes executing the macro before allowing another DDE transaction to succeed. If WaitFlg is set to true, subsequent calls to ExecuteMacro, ExecuteMacroLines, PokeData, PokeDataLines, and RequestData will fail until the DDE server application completes the macro.

Attempting to execute a macro or poke data before a DDE server application completes a currently executing macro may cause the executing macro to fail or to produce unpredictable results. See the documentation of the DDE server application for the results of sending command strings or poking data before macro execution has completed.

Note: ExecuteMacro returns true if the macro command was successfully passed to the DDE server. A true value does not ensure that the macro command will execute successfully once it has been accepted by the server.

See Also