I am writing a node.js script that will run on a Mac computer. I'd like to get the coordinates of the application running in the foreground and process details.
For example, if I run the script and the only program I have open is Google Chrome then I should get an array with 1 object containing:
- Google Chrome's process ID
- the x/y coordinates of the Google Chrome window.
So far all I have been able to do is get the list of running process:
- ps-node: A process lookup utility
If it helps, I will also be using the nw.js framework to run my application.