Bring process to focus by PID



Is there a way to bring a process to focus when you know the PID? I need to bring another app (already running, for which I know the PID) to focus when a button is clicked in my electron app



I can’t find anything in the Node docs or on NPM. This might be something you need to write. If you do get a solid cross-platform implementation working, it would be a good thing to distribute.