DDE - Request

Declaration

<AMDDE ACTIVITY="request" APPLICATION="text" TOPIC="text" ITEM="text" RESULTVARIABLE="text" TIMEOUT="number" />

Related Topics    

Description

Uses an open dynamic data exchange (DDE) channel to request information from the receiving application, and populates the information onto an existing variable.

Practical Usage

Used to retrieve specific data from another application. When you request information from the topic in the server application, you must specify the item in that topic whose contents you're requesting. In Microsoft Excel, for example, cells are valid items, and you refer to them by using either the "R1C1" format or named references.

Parameters

General

Property Type Required Default Markup Description
Application Text Yes (Empty) APPLICATION="Excel" The name of the application that the DDE conversation should be initialized with. Each DDE conversation is uniquely defined by the application name and topic. At the beginning of a DDE conversation, the client and server determine the application name and topic. The application name is usually the name of the server application. For example, when Excel acts as the server in a conversation, the application name is Excel.
Topic Text Yes (Empty) TOPIC="primary_file" The server-defined topic name of the DDE conversation. The DDE topic is a general classification of data within which multiple data items may be "discussed" (exchanged) during the conversation. For applications that operate on file-based documents, the topic is usually a file name. For other applications, the topic is an application-specific name.
NOTE: The server application defines the topic names available for a DDE conversation. See documentation for the DDE server application for specific information about the names of available topics.
Populate variable with result Text Yes (Empty) RESULTVARIABLE="myvar" The name of an existing variable that should be populated with the return value from the DDE server application after a request has been made.
Item Text Yes (Empty) ITEM="source" The server-defined item name of the DDE conversation. A DDE data item is information related to the conversation topic exchanged between the applications. Values for the data item can be passed from the server to the client, or from the client to the server.
NOTE: The server application defines the item names available for a DDE conversation. See documentation for the DDE server application for specific information about the names of available items.
Timeout (milliseconds) Number No 60000 TIMEOUT="99000" Scalar specifying the time-out limit (measured in milliseconds) for this operation. The default value is 60000.

Description

Error Causes

On Error

Examples

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description

This sample task requests information from a Microsoft Excel spreadsheet.

Copy
<AMDDE ACTIVITY="request" APPLICATION="Excel" TOPIC="Sheet1" ITEM="R1C1" RESULTVARIABLE="theVar" />