TextPad Command Line Argument: Open in Existing TextPad Instance

5,874

You have to use the ddeopen32 command line tool provided with textpad:

"C:\Program Files\TextPad 7\system\ddeopn32.exe" TextPad.dde myfile.txt(40)

this will open myfile.txt in textpad and move the cursor to line 40.

if there already is an existing instance of textpad, it will use it.

if this instance is already editing myfile.txt, it won't open another editing window, but it will activate the already opened copy and it will jump to line 40.

Share:
5,874
user363934
Author by

user363934

Updated on September 18, 2022

Comments

  • user363934
    user363934 almost 2 years

    What are the command line arguments you can use for TextPad? I've searched for this but TextPad doesn't document this.

    We have an external application; when the user clicks a button our application will open a document in TextPad using command line arguments.

    I wish to use command line arguments to make TextPad open a document in an existing instance of TextPad rather than a new instance. I'm aware that the user can set this setting in TextPad's settings (turn off multiple instances) but I wish to save the user having to do this step and automatically show the document in an existing instance of TextPad.