Syntax: #DDE server topic macro

This command allows you to communicate with an external program via Microsoft Windows Dynamic Data Exchange (DDE). You must consult the documentation of your external program to determine the syntax of its macros, and its defined topic names. The server name is usually the name of the program itself (without the .EXE). There are also built-in functions for DDE:

Communicates with the specified server and topic and returns the requested item as the value of the function call.
sends value as the new item to the specified DDE server and topic.
does the same as this #DDE command and sends a DDE macro to the server.

If you open a DDE connection with the %ddeopen(server,topic) function, then you do not need to specify the server and topic in the other functions. This DDE connection is global to zMUD and available in any window. When you are finished with a DDE connection, use the %ddeclose() function.

Note the zMUD also acts as its own DDE server. The server name is zmud, the topic name is also zmud, and the only defined item name is data. Using a DDEPoke you can set data to any command string and cause all variables and function calls to be expanded. You can then use a DDE call to retrieve the resulting value of data. Using DDEMacro you can send a command string to zMUD and cause it to be executed as if it were typed.

DDE examples

Since DDE is somewhat obscure, I have included a bunch of useful examples:

#DDE NETSCAPE WWW_OpenURL {http://pobox.com/~~zugg/zmud.html}
If you have NetScape, this command will send the specified URL and cause it to be opened. Note that because the tilde character is used in zMUD to quote special characters, you must use two of them to send one to Netscape.
#DDE ZMUD ZMUD {remove all;drop all}
Causes the indicated commands to be sent to zMUD and executed! Watch out!
Tells Microsoft Excel to load the spreadsheet TEST.XLS and returns the value of cell R1C1 (row 1, column 1)
Sends the value of the variable tank to Excel which overwrites R1C1 in spreadsheet TEST.XLS