DDE - Request

Declaration

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

Related Topics    

Overview

Uses an open dynamic data exchange (DDE) channel to request information from the receiving application and add the information to 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 the topic from which you are requesting. In Microsoft Excel, for example, cells are valid items. You can refer to them 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 is 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 can 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 to be populated with the return value from the DDE server application after a request is 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 the documentation for the DDE server application for specific information about the names of available items.
Timeout (milliseconds) Number No 60000 TIMEOUT="99000" Scalar specified time-out limit (measured in milliseconds) for this operation. The default value is 60000.

Description

Error Causes

On Error

Examples

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

The following sample task requests information from a Microsoft Excel spreadsheet:

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