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.
DDE
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
I managed to get this to work in Delphi, note the square brackets in the ExecuteMacro function:
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()?
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;
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
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.
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
Bob