if PDDE.ExecuteMacroLines(WPCommands, True) then begin
log('WPCommand Worked!')
{ I need to wait for WP to complete the command now... }
end
else log('WPCommand Failed!');
WPCommands.Free;
end;
A Coupla'notes: You cannot use the 'True!' or 'False!' equates as you would in a real WP Macro. You must use the numeric values. I have found that if you go into WP and use the macro build facility, you can extract the enumerated types by watching the dialogue box as you select the commands and their associated parameters.
From what I can TELL, the way DDE works with WP/Delphi, the first command returns the 'Okay, I got it' message, and proceeds to process the macro. When you attempt to send the SECOND DDE request, IT waits for the first to complete, so where you see the 'I need to wait....' message, you get control back immediately. I would rather wait for the command to complete before I return from my procedure.