NextPrevUpTopContentsIndex

17.2.5 Execute transactions

A client can issue an execute transaction across a conversation, or in the case of an automatically established conversation, to a recognized server. There is no need to specify a topic, as an execute transaction instructs the server application to execute a command.

The command and its arguments are issued to the server in the form of a string in a standard format (see Execute transactions). LispWorks provides two ways of issuing an execute transaction, namely dde-execute-string and dde-execute-command (and the corresponding * functions that automatically manage conversations).

dde-execute-string

Function

dde-execute-string conversation command &key errorp

The function dde-execute-string takes the command to issue in the form of an appropriately formatted string. The following example shows how dde-execute-string* can issue a command to a server designated by :excel on the topic :system , in order to open a file called foo.xls :

(win32:dde-execute-string* :excel :system "[open(\"foo.xls\")]")

dde-execute-command

Function

dde-execute-command conversation command arg-list &key errorp

The function dde-execute-command takes the command to issue, and its arguments, and marshals these into an appropriate string for you. The following example shows how dde-execute-command* can issue the same command as in the previous example:

(win32:dde-execute-command* :excel :system `open `("foo.xls"))
LispWorks User Guide - 7 Jul 2004

NextPrevUpTopContentsIndex