I am writing a Time Billing system and want to allow the user to track what documents (ie window names) they have open in given applications (eg Photoshop), and for how long, so they can be charged to a client. I mainly need this for macOS and Windows, but potentially Linux too. Is there an easy way to do this?
I can get a list of the current processes using:
Dim tempProcessMBS As New ProcessMBS 'for macOS and Windows
result = shell("tasklist") 'for Windows
result = shell("ps aux") 'for macOS and Linux
But how do I get a list of the documents (or window titles) they have open at any given time? If I knew the documents, I could use the lsof command, but I don't.
For macOS I have tried CGSWindowMBS, but it doesn't return the window title names.
For Windows, I intend to try WindowsListMBS. I can get the windows in the frontmost application using <https://www.monkeybreadsoftware.net/accessibility-accessibilitymbs-method9.shtml#25>, but not the others.
For Linux, I shall try LinuxProcessMBS.OpenFiles
Is this the right direction? Has anyone already accomplished this?