"Open file" and "Jump to Line" - via DDE

General questions about using TextPad

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

Post Reply
ralfiii
Posts: 3
Joined: Sat Jan 03, 2004 11:39 pm

"Open file" and "Jump to Line" - via DDE

Post by ralfiii »

Hello,

I'd like to use Textpad in conjunction with other software to quickly display important parts of bigger textfiles to the user.

Therefore I'd need
1.) a possibility to Check which document is currently open, if it's not the one that is needed, open it.
2.) I need to navigate to a specific line in the document.

Is this possible with textpad? (It would for the moment also be OK if I'd always open the required file)

I guess I can't use COM (I didn't find an interface), maybe with a command line parameter?

Thanks,
Ralf S.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

The following note is from the TextPad Help section on "Command Line Parameters":
If the filename to be edited (not printed) is followed by "(<line>[,<col>])", with no intervening spaces, the file will be opened with the cursor at that position. If <line> is a hex number (eg. 0x1a22), a hex view of the file will be created, with the cursor at that address.
eg. TEXTPAD.EXE -ac "Read me.txt"(51,20)
Hope this was helpful.............good luck,
Bob
ralfiii
Posts: 3
Joined: Sat Jan 03, 2004 11:39 pm

Post by ralfiii »

Thanks!
That's it!!!!
Post Reply