home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
tt2man.zip
/
ttdde.doc
< prev
next >
Wrap
Text File
|
1993-12-13
|
6KB
|
109 lines
TABLE OF CONTENTS
G. Appendix G - Dynamic Data Exchange (DDE)
G. Appendix G - Dynamic Data Exchange (DDE)
Dynamic Data Exchange (DDE) is a standardized protocol for exchanging data
and commands between applications running under the Presentation Manager.
TalkThru supports DDE as both a client and a server using commands in the
AUTOPILOT script language. A discussion on the AUTOPILOT Statements used
for DDE is in the Chapter, AUTOPILOT Statements By Category and the syntax
for the Statements is in the Chapter, AUTOPILOT Statement Reference. Refer
to these chapters when you wish to code a DDE application utilizing
AUTOPILOT. You may also refer to the sample scripts provided with TalkThru
named TTSERVER.SCR and TTCLIENT.SCR.
The information described below provides a general overview of DDE, how it
is structured, and the features supported through the AUTOPILOT language.
This information will be necessary in understanding the AUTOPILOT syntax
you will use.
DDE conversations always take place between a client and a server. The
client starts a conversation and makes requests of the server. The server
only responds to client requests. A single AUTOPILOT script can be both a
client and a server.
A DDE conversation is identified by Application and Topic names. Data
passed between the client and server is identified by an Item name.
Application name uniquely identifies the server application. A server may
recognize several topics and several Items within a single Topic. A server
application may be engaged in a conversation with several client
applications at the same time. A client application may be engaged in a
conversation with several servers and/or topics at the same time.
To conduct a DDE conversation, the client and server need to agree upon the
Application, Topic, and Item names. The following section describes these
names in greater detail.
Application
An Application name is the name of the server from which data is desired.
If TalkThru is the server, the Application name is defined in the server
script. If TalkThru is the client, the server program will document the
Application name it will respond to. For example, Microsoft Excel uses
EXCEL as an Application name.
Topic
A Topic is a logical data context. For applications that operate on
file-based documents, topics usually are file names; for other
applications, they are application specific strings. In addition, most
servers support a "SYSTEM" topic which provides a context for information
that may be of general interest. If TalkThru is the server, Topic names
are defined by the script. If TalkThru is the client, the server program
will document the Topic names it will respond to. For example, Microsoft
Excel supports the SYSTEM topic and the file name of any open worksheet.
Item
An Item name identifies a particular data object that is used in a DDE
transaction. If TalkThru is the server, Item names are defined by the
script. If TalkThru is the client, the server program will document the
Item names it will respond to. For example, Microsoft Excel uses an Item
name of "R1C1" to refer to the first cell in a worksheet.
Once a conversation is established, the client application controls the
flow of the conversation by requesting various transactions. A client can
issue four types of transactions: REQUEST data from a server, POKE (send)
unsolicited data to a server, ask the server to EXECUTE a command, and
establish an advise link with a server where the client receives
notification (WARM_LINK) or data (HOT_LINK) from the server each time a
specified data item changes.
REQUEST Transaction
A client can ask a server to supply a specific data item by issuing a
REQUEST transaction for a specific Item name. For example, a client
application could obtain the contents of the row 1 column 1 cell in an
Excel worksheet by issuing a REQUEST transaction for Item "R1C1".
POKE Transaction
A client can supply a server with an unsolicited data item by issuing a
POKE transaction for a specific Item name. For example, a client
application could change the contents of the row 2 column 5 cell in an
Excel spreadsheet by issuing a POKE transaction for item "R2C5".
ADVISE Transactions
There are two types of advise transactions: HOT_LINK and WARM_LINK. In a
hot link, when the data item changes, the server immediately sends the
changed data value to the client. In a warm link, the server notifies the
client that the value of the data item has changed, but the server does
not actually send the data value until the client requests it (using a
REQUEST transaction).
EXECUTE Transaction
A client can instruct a server to perform a command by issuing an EXECUTE
transaction. For example, a client could instruct Excel to open a specific
worksheet by issuing an EXECUTE transaction for '[OPEN("C:\NAME.XLS")]'.
A server application will document the commands that it will respond to.
If TalkThru is the server, the commands that it will respond to are
defined in the server script.