Page 1 of 1

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

Posted: Sat Jan 03, 2004 11:54 pm
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.

Posted: Sun Jan 04, 2004 12:28 am
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)

Posted: Sun Jan 04, 2004 4:46 pm
by ralfiii
Thanks!
That's it!!!!