RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDdeClientConv.ExecuteMacro Method

Sends a macro command string to the DDE server application.

Pascal
function ExecuteMacro(Cmd: PAnsiChar; waitFlg: Boolean): Boolean;
C++
__fastcall Boolean ExecuteMacro(PAnsiChar Cmd, Boolean waitFlg);

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.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!