'Is there a way to get Slack's focused channel name programmatically in macOS/Swift?

Is there a way that macOS/Swift app can retrieve Slack's currently-focused Workspace name and channel name?

So, given that Slack app is running, is there any way my 3rd-party-app can inspect Slack's app UI elements or directly get a name of currently focused Workspace and channel name?

I had a look at Slack-Applescript github project, but it doesn't support retrieval of relevant data.



Solution 1:[1]

As user3579815 posted in its comment, Slack Window name contains the relevant data I requested in the question.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mixtly87