800-222-0550 /
732-287-2100
PowerTerm InterConnect -- DDE
PowerTerm can be used as either a DDE client or DDE Server application.
Here is an example of PowerTerm as a DDE client, using the DDE.PSL script
which is included in the PowerTerm program.
- On your PC, start an Excel spreadsheet, and input the following
formula into R2C1:
- =SUM(A1:C1)
- Save this sheet as TEST.
- Minimize the Excel program.
- Connect to your host with PowerTerm.
- Compose a screen on the host which has 3 numbers on rows 4, 5, 6
in columns 10-15.
- Start a program on the host, such as vi which will accept input.
- From PowerTerm, run the DDE.PSL script (Script | Run Script)
- Choose DDE from the list of available script, and Press Open.
The sum of the 3 numbers you put onto the host screen in Step 3, above,
will appear. The 3 numbers have been sent (via DDE) by PowerTerm to the
Excel program. Then the formula in R2C1 computed the sum of the 3 numbers.
Lastly, this result was sent back by PowerTerm to your host application.
This illustrates the use of PowerTerm as a DDE client.
Discussion of the DDE commands in the DDE.PSL script:
- conv = [dde initiate EXCEL TEST.XLS] This opens
the DDE channel between PowerTerm and the Excel program (which must
already be running.) Windows gives this channel an ID number, which
PowerTerm stores in the conv variable.
- dde poke $conv R1C$i $cel($i) This uses the channel
stored by the $conv variable and places into the sheet [with the DDE
poke command] in cell R1C$i [we are in a PowerTerm for loop] the value
we stored earlier in as the array element, cel($i).
- sum = [dde request $conv "R1C2"] This gets the
value stored in R1C2 [with the DDE request command] and stores it in
the sum variable.
- dde terminate $conv This closes the DDE channel.
Read our FAQ for
answers to Frequently Asked Questions and current version information.
UniPress Software, Inc.
2025 Lincoln Highway
Edison, NJ 08817
USA
800-222-0550 / 732-287-2100
Send mail to:
unimarket@unipress.com
PowerTerm is a product of Ericom Software Ltd.
Visit the
UniPress Software, Inc. Web page.
Last updated: August 25, 1997