DDE

General questions about using TextPad

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

Post Reply
Bob Hansen

DDE

Post by Bob Hansen »

The help for TextPad shows that there are 5 commands for DDE data transfers. I have been trying to use these commands without success. Can someone please provide a real working example for saving the current file in TextPad under another name using SaveAs?

I am confused about the syntax. I have tried it with/without quotes, with/without parentheses, etc. Other users in MacroScheduler forum have not been able to make the DDE commands work for TextPad either.

I am specifically using MacroScheduler, DDEPoke command, which has four paramaters using the following syntax:
DDEPoke>Server,Topic,Item,Data

I am using "TextPad" for the Server (without the quotes).
I have tried using combinations of "SaveAs"and "filename" for the Topic, the Item, the Data. The "filename" includes the full path.

Thanks for your support.
User avatar
Bob Hansen
Posts: 1517
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Just another plea for help, anyone been able to use DDE with Textpad successfully?
Hope this was helpful.............good luck,
Bob
bveldkamp

Post by bveldkamp »

I managed to get this to work in Delphi, note the square brackets in the ExecuteMacro function:

Code: Select all

DdeClientConv1.SetLink('textpad', 'system');
DdeClientConv1.OpenLink;
DdeClientConv1.ExecuteMacro('[Command(Insert,"string")]', false);
DdeClientConv1.ExecuteMacro('[Command(SaveAs,"C:\temp\test.txt")]', false); 
DdeClientConv1.CloseLink;
I don't know Macro Scheduler, but I assume DDEPoke() is the equivalent of Delphi's PokeData(), which I don't use. So, maybe there's a Macro Scheduler substitute for ExecuteMacro()?
User avatar
Bob Hansen
Posts: 1517
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Thanks bveldkamp.

I don't use Delphi, but I think I can see what you are doing..

Yes, Macro Scheduler does have a command to call its own macros.

I did not have a real "must have" need, but was experimenting, and had subsequently given up. Now you have given me a reason to get back in and try again......thanks again for the structure you have provided.
Hope this was helpful.............good luck,
Bob
Post Reply