>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User

# DDE Conversations

There are three types of DDE conversations, known as hot, warm and cold:

- in a hot link, the client asks that whenever some data changes, the server send it the new data.
- in a warm link, the client asks that whenever some data changes, the server send it an indication that the data has changed (but not the new data itself).
- in a cold link, the server never notifies the client whenever data has changed.

  Programs to handle each of these will be slightly different, and you will need to know what type of conversation the other application supports.

  Hot and warm links are also known as advise loops.

  A warm link is essentially a combination of a hot and cold link - the hot link advises of a change in the data item, the cold link is used to send the data item.

  A conversation uses three identifiers: service, topic and item. A conversation may also move data:

- service identifies the server application, and is typically set by the server
- topic is a high level identifier of the information being exchanged
- item is a low level identifier of the information being exchanged
- data is the data being exchanged (as character data)

  Service, topic, and item names are case-insensitive.

  Some applications require specific topic and item names be used; others do not care. A commonly used topic is the system topic, which may also have a sysitems item, both are used to provide information about a server application to a client. For example, Lotus 123 for Windows has a system topic:

         wd 'ddereq 123w system sysitems'
      SysItems Topics Formats RangeNames Selection Status

         wd 'ddereq 123w system status'
      Ready

  Some applications such as spreadsheets allow data to be exchanged in clipboard format. The utility `clipfmt` in script format.ijs will convert a list or table into clipboard format.

  With spreadsheets, it is typical for the topic to be the worksheet name, and the item to be the cell or range name. For example, suppose `data` is a table of shape two by three, then this could be written to an Excel worksheet `sheet1` as follows:

         txt=. clipfmt data
         wd 'ddepoke excel sheet1 r1c1:r2c3 *',txt

  Some servers support a DDE execute command, allowing the client to use the server's command language directly. However, servers that support execute usually do so only in the system topic, and then only in a limited fashion, for example to run menu commands such as File/Open. For non-trivial tasks it is usually best to create a macro in the application and then use the execute command to run the macro. Most applications follow the conventions for execute expressions indicated in the following:

         [open("sample.xlm")]
         [run("r1c1")]
         [connect][download(query1,results.txt)][disconnect]

>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User