Very simple script to display a .txt in text editor according to the active object

-10 euros
double if before 17-09-21
triple if before 16-09-21 9am Paris time

From the 3D view, with an object selected (active) and with a customized shortcut, I need to automatically open -in the text editor- an existing .txt file whose name is the same(*) as the one of the active object?

(*)Most objects are instanced and their names are followed by ‘.r’/’.l’; this part should be ignored.

The action must be repeatable several times with several objects; not creating nor deleting anything only switching the .txt file displayed in the text editor.


Key stroke? Button? Menu item?

That will be the hard part. The rest sounds easy.

Hi Calpgrmr.
Sorry, the job has been done.

I may have other things to do in the future and will let you know.