Open new file in TextPad using current instance, allowing for multiple instances

0

I would like to configure Windows 7 to open every new .txt file into the first of the existing TextPad instances.

I know how to open new files all into a single TextPad instance but I am trying to avoid disabling multiple instances.

Instead, if multiple instances are open, open the new file in the first (or last, if it can be configured) instance.

I remember it used to be able to be done in Win2K and Windows XP under File Associations and there was something like a command options field where there was specific syntax that enabled this. So back then, I was indeed able to perform this functionality.

amphibient

Posted 2012-09-21T19:45:06.713

Reputation: 1 613

I guess this would require some sort of custom script/program, which would compare the PIDs of the instances and open the file in the one with the smallest PID. – Karan – 2012-09-21T20:04:30.380

it was simpler than that in Win2K, it was just command line options – amphibient – 2012-09-21T20:46:34.397

Are you sure this was an out of the box feature, and not using some 3rd party utility? I'd actually love to know more about this and how it worked under Windows 2000, i.e. what options were used to specify the particular instance required. – Karan – 2012-09-21T21:04:49.010

Answers

2

I don't remember where I found this, but you can modify your registry to get this working. I've tested it with both TextPad 5 & 6, and it works.

Here's what regedit exports:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec]
@="[open(\"%1\")]"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec\application]
@="TextPad.6"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec\IfExec]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec\topic]
@="System"

You should be able to import the above if you save it as a .reg file, or you can do it manually. If you're using TextPad 5, you need to change the value of the "application" key to "TextPad.5.0"

Todd

Posted 2012-09-21T19:45:06.713

Reputation: 21