DDE Commands

 

Dynamic Data Exchange (DDE) provides a way for Windows programs to share data and interact with one another. WinList supports DDE as a client of other applications. In other words, it can request information and instruct other applications to do things. It does not support DDE as a server of information.

 

When connecting WinList to other applications with DDE, there are several internal commands which WinList recognizes. These commands allow you to ship data to other programs and to retrieve data from them. Below is a list of the current internal DDE commands for WinList and an explanation of usage for each.

 

POKE

This command is used to send histogram or results data to another program in either TEXT format or VSH format. The syntax of the command is:

POKE(externalRef, format, {optional internal reference} )

 

where externalRef is a reference the other application uses to determine where to put or how to use the data, and format is either TEXT, TEXTNOHEADER, or VSH. TEXT format is supported by most applications that can paste text from the clipboard. TEXTNOHEADER format is identical to TEXT except that it sends a result window's text as a table of information, without column headings. It can only be used with results windows. VSH is a Verity Software House binary data format, which provides a more efficient use of memory. It pertains only to histogram connections and should be used when interacting with other VSH products or with products known to support the format.

The optional internal reference can be literal text or any keyword in the keyword tree. This allows you to send any kind of information that WinList knows about to the remote application. If a keyword is used for this option argument, it must be enclosed in curly braces { }. Literal text does not need any special formatting.

 

Examples:

POKE(DATA,VSH) - used to send data to ModFit or IsoContour.

POKE(R1C1:R64C64,TEXT) - used to send a 64 x 64 resolution histograms to Microsoft Excel in TEXT format. Note the reference tells Excel to put the data into the active spreadsheet at row-1 column-1 to row-64 column-64.

POKE(RC:R[+6]C[+6],TEXTNOHEADER) - used to send a results window to Microsoft Excel in TEXT format, excluding the column headings and id fields in the results window. The reference tells Excel to put the data into the active spreadsheet at a location starting at the current row and column, and extending through 6 rows and 6 columns. Relative references of this sort are very useful for adding results to a database without overwriting previous results.

POKE(KEYWORDS,VSH,KEYWORDS) - used in a histogram connection to send keywords from the listmode file to a Verity application like ModFit LT 3.0 or greater.

POKE(R1C1:R1C255,TEXT,KEYWORDS) - sends keywords from the listmode file to an application like Microsoft Excel. The format of the keywords is keyword followed by a tab character, then the keywordValue and another tab character.

POKE(R1C1,TEXT,R1 Events) - sends the label "R1 Events" as text to an application like Microsoft Excel to place in row 1 column 1.

POKE(R1C2,TEXT, {DS1:$DATE}) – evaluates the string "{DS1:$DATE}" as a keyword, and then sends the result as text to an application like Microsoft Excel to place in row 1 column 2. See Internal Keywords for a list of special internal keywords supported by WinList.

POKE(R2C1,TEXT,{DS1.R1.%Gate}) - sends the %Gate statistic for R1 in data source 1 to row 2 column 1 in Excel.

POKE(R3C1,TEXT,{DS2:SPILL}) - sends the SPILL keyword value from data source 2 to row 3 column 1 in Excel.

 

PASTE

This command tells WinList to paste a copy of the contents of the Windows clipboard into the histogram or results window for display. The syntax is PASTE(format) where format is METAFILE or TEXT. METAFILE is a picture format supported by many Windows graphic programs and can be used by both Results and Histogram windows. TEXT format should only be used with Results windows. When WinList successfully completes the PASTE command, the pasted object will be displayed in the window.

 

Examples:

PASTE(METAFILE) is used to get a copy of a picture from the clipboard. It can be used both by Results and Histogram windows.

PASTE(TEXT) is used to get a copy of text from the clipboard. It can be used only by Results windows.

 

COPY

This command tells WinList to copy the results or histogram window to the Windows Clipboard so that another application can paste it into its workspace. Its syntax is COPY(format) where format can be METAFILE, TEXT, or BITMAP.

 

Examples:

COPY(METAFILE) is used to copy a picture of a histogram to the clipboard. It can be used only by Histogram windows.

COPY(TEXT) is used to copy text to the clipboard. It can be used only by Results windows.

COPY(TEXTNOHEADER) is used to copy text to the clipboard. It can be used only by Results windows. The only difference between this format and TEXT format is that TEXTNOHEADER strips off all lines up to and including the column headings. It is useful for databasing of results in another program using a DDE connection.

 

SETREGIONRESULT

This command tells WinList to set the value of a specific region's result to a value extracted from a remote application. Its syntax is SETREGIONRESULT("region reference","external request") where region reference is in R(n,stat) format and external request is a string which is requested from another application. For more information on R(n, stat) format, see Internal Keywords. External Request is expected to be a value number of the same type as the field it is copied to.

 

Examples:

 If connected to ModFit, SETREGIONRESULT("R(1,REGIONEVENTS)","A[1,0]") tells WinList to ask ModFit for the answer to "A[1,0]", and to put the result into the Region Events field for Region 1.

 

PAUSE

This command is supported by histograms. It displays a dialog with optional message and waits to proceed until the dialog is closed. The dialog appends "Press OK to continue or Cancel to stop the script." Its syntax is PAUSE(message) where message is optional text for the message.

 

Example:

PAUSE(Please check results in ModFit LT.)

This command in a histogram script displays dialog "Please check results in ModFit LT. Press OK to continue or Cancel to stop the script."

 

SLEEP

This command is used to allow WinList to "sleep" for a specified period of time. It is useful in cases where the remote application needs to perform some time-consuming task, which could cause the script to timeout.

The command syntax is:

SLEEP(milliseconds)

For example, adding a script line

SLEEP(2000)

would cause WinList to sleep for 2 seconds.