What you need to do is have a config window that shows all the running processes and you can select which you want to show the title of.
This can be done by using EnumProcesses and GetModuleFileNameExW
js code:
var aProcesses = Interop.Allocate(1024);
var bytesReturned = Interop.Allocate(4);
var szPidName = Interop.Allocate(512);
var hProcess;
Interop.Call('psapi', 'EnumProcesses', aProcesses, aProcesses.Size, bytesReturned);
for (var i=0; i<=bytesReturned.ReadDWORD(0)/4; i++) {
hProcess = Interop.Call('kernel32', 'OpenProcess', 0x400 /* PROCESS_QUERY_INFORMATION */ | 0x10 /* PROCESS_VM_READ */, 0, aProcess.ReadDWORD(i*4));
Interop.Call('psapi', 'GetModuleFileNameExW', hProcess, szPidName, 200, 500);
Debug.Trace(aProcess.ReadDWORD(i*4)+' : '+szPidName.ReadString(0));
}
aProcesses.Size = 0;
bytesReturned.Size = 0;
szPidName.Size = 0;
Untested code as I am at work.