Tool to open a file using DDE ??

General questions about using TextPad

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

Post Reply
madhg
Posts: 2
Joined: Wed Aug 09, 2006 8:13 pm

Tool to open a file using DDE ??

Post by madhg »

Is it possible in TextPad to set up a Tool which uses DDE?

I don't know much about DDE. What I want to do is open a .pdf file in Acrobat Reader using DDE commands DocOpen and FileOpen. Here's a screenshot of another editor in which I can do this: http://www.zen22109.zen.co.uk/screenshot-TXC.jpg

I do really need to use DDE to open the file. The other editor (TeXnicCenter) is good for running Latex, but TextPad is much more powerful in other ways; I'm evaluating it, and will buy if it will let me use DDE in the way I need.

thanks in advance, David
drefty
Posts: 35
Joined: Mon Dec 22, 2003 3:53 pm

opening PDF file from TextPad

Post by drefty »

The context of your question is not entirely clear, because it emphasizes DDE without emphasizing specifically a step-by-step description of what you are trying to do.

You can use TextPad to open a PDF in a few different ways, each of which works without using DDE.

One way is to include a link to the pdf in a text file, highlight the link, and then activate a tool that opens whatever you have highlighted with whatever PDF-compatible software you want to run.

One way is to include a link to the pdf using the syntax supported by a browser href="file://foo.pdf" and then press ctrl+G on that link, which will cause it to be opened with your default pdf handler.

Without more detail of what you are wanting to do, it is not clear whether DDE is even relevant, let alone necessary for your specific requirements.

hope that helps
madhg
Posts: 2
Joined: Wed Aug 09, 2006 8:13 pm

Re: opening PDF file from TextPad

Post by madhg »

[quote="drefty"]The context of your question is not entirely clear, because it emphasizes DDE without emphasizing specifically a step-by-step description of what you are trying to do.[/quote]

Thanks for your reply. It made me think more carefully about what I wanted to do. It's not viewing the .pdf file that's the problem, it's closing the .pdf file if it's already open in Acrobat Reader. Here's the problem in more detail.

The screenshot I linked in my posting showed commands to open a .pdf file in Acrobat Reader, but close the file by DDE before doing anything else. It's a screenshot of configuring TXC (TeXnicCenter), a special-purpose editor for running the typesetting program LaTeX. TXC runs the LaTeX compiler to produce a .pdf doc, and displays it in AcroRead. It has to close the .pdf file first, because you cannot write a new version of the .pdf file to disk if the file is currently open in AcroRead.

I'm now using Lilypond, music processing software similar to Latex, which compiles a text file and produces a .pdf document. There is the same problem, that it can't write the .pdf document if it's already open in AcroRead.

What I'd like to do is set up a tool which closes the .pdf file if open in AcroRead, then runs Lilypond to produce an updated version of the .pdf, and then views the output.

best wishes,
David
drefty
Posts: 35
Joined: Mon Dec 22, 2003 3:53 pm

Post by drefty »

Your description of what you are trying to do helps a lot, and it makes sense, but the best answer probably has little to do with TextPad, and more to do with your other software.

In order to use DDE to control your software, you will need to know the available DDE commands that your software supports. That is beyond the scope of this forum, but you can find some leads through your favorite search engine. Be advised that there is no guarantee that your software supports DDE at all, since that is not a universal feature of all windows software.

DDE is only one of several different ways to control software, and to get different pieces of software to 'talk' to one another. Controlling software externally and getting it to work together (sometimes called 'Interop') seems to be really what your question is all about.

As far as TextPad goes, it is sufficient to do basic things, but for the advanced parts of your work you may need to create a script that 'controls' your software, and then use Textpad to call that.

Do a search on this forum (or on the internet) for terms like "DDE", "OLE", "Autoit", "AutoHotkey", "Windows Scripting Host" as well as the name of your software. This will give you a good overview of some of the options available to you.

HTH
Post Reply