DDEInitiate - begin a DDE conversation with a DDE server application

Return to Introduction  Previous page  Next page

$return = DDEInitiate(service,topic[,onErrorLabel:])

Where:

$returnis the variable that receives the DDE channel number. Subsequent DDE script commands reference the channel number created by DDEInitiate.
serviceis the name of the DDE application for this conversation.
topicis the name of the DDE topic for this conversation.
onErrorLabel:is a label that execution transfers to if an error occurs.

 

The DDEInitiate command begins a Dynamic Data Exchange (DDE) conversation between TN3270 Plus and another application. The DDE conversation allows data to be exchanged between TN3270 Plus and the other application.

Example

$channel = DDEInitiate("EXCEL","Sheet2")

 

 

Sample Script

' This script starts Microsoft Excel with a test spreadsheet.

' "some data" is then put into row 1 column 1 of the spreadsheet.

' The spreadsheet is saved and Excel is closed.

' The DDE conversation is terminated.

'

Run("C:\Program Files\Microsoft Office\Office11\excel.exe ""D:\Test.xls""")

Wait(1000)

$channel = DDEInitiate("EXCEL","Sheet2")

DDEPoke($channel,"R1C1","some data")

DDEExecute($channel,"[SAVE()][QUIT()]")

DDETerminate($channel)

exit

 

See Also:

 

DDE

DDEExecute

DDEPoke

DDERequest

DDETerminate


TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.