DDE INSERT FORMAT for an AutoComplete tool

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
elrond
Posts: 1
Joined: Fri Mar 14, 2008 2:58 am

DDE INSERT FORMAT for an AutoComplete tool

Post by elrond »

I am working in an auto-complete tool for Textpad, and I am having problems running the command that inserts a text from my application in the current position of the current document in TextPad.

There is c# function that executes the commands.

(lets assume that the DDE connection has been started properly and so forth)

client.Execute(string command, int timeout)

My question would be: Which is the correct format for the command string.

I have unsuccessfully tried:
"[command(Insert,Hello World)]" (from Texpad documentation)
"Insert,Hello World"
"command(Insert,Hello World)"

thank you in advance
drefty
Posts: 35
Joined: Mon Dec 22, 2003 3:53 pm

Post by drefty »

Here is an example using perl that I wrote a few years ago after struggling to get Textpad DDE Insert to actually work.
[code]
### These commands must be passed exactly as shown, with no embedded spaces, except in the quotes.
###

use Win32::DDE::Client;
$oTPad = new Win32::DDE::Client('TextPad', 'System');
$sTest = "Hello World\n" x 5;
$oTPad ->Execute('[command(Insert,"'.$sTest.'")]');
[/code]

==== Personal opinion
Please note, that you may be disappointed by the limitations of DDE insert, as it doesn't work very elegantly with the TextPad edit area and cursor. Also, you may notice a few odd quirks, such as the inability to replace the currently selected text with the value of your DDE insert.
Post Reply