If I open multiple windows/tabs of a browser, and I want to distinguish between them so that I can control those windows individually from my application, what is the approach? If I send command programmatically to a process with PID
id it will send that command to the most recently active window but I want to send command to all the window of that process. If I query for PID of running process with CGWindowListOption
I get owner PIDs of running processes. let windowsListInfo = CGWindowListCopyWindowInfo(options, CGWindowID(0))
I need to know and use something that will trigger multiple window/process at the same time. Is there a different PID of different window of the same process? For example: Chrome tab 1 has a pid, tab 2 will have another pid. How to find those PIDs instead of the owner PID only?
So how can I find out different process id or similar attribute of a process with multiple window with same owner PID?