Hammerspoon / hammerspoon

Staggeringly powerful macOS desktop automation with Lua
http://www.hammerspoon.org
MIT License
11.7k stars 578 forks source link

Telegram app returns no Windows #3324

Open dabeeeenster opened 1 year ago

dabeeeenster commented 1 year ago

First up thanks for hammerspoon - its the best app on my Mac!

I'm having trouble with a new version of Telegram (9.1.1.238861 AppStore version). With hs.application.find("Telegram"):allWindows() I don't get any windows returned.

> tprint(hs.application.find("WhatsApp"):allWindows())
{
  [1] = "hs.window: WhatsApp (0x600000568a78)",
}

> tprint(hs.application.find("Telegram"):allWindows())
{
}

(tprint is just a utility function that displays tables in a list)

Any idea how I can debug this? I have a hotkey that positions all my windows, and it doesnt work on Telegram for the above reason.

cmsj commented 1 year ago

So it seems like you're at least able to get the hs.application object. It's possible that Telegram are doing something annoying and not actually creating their windows in a way that we can see. Presumably it's some kind of awful web page pretending to be an application?

muescha commented 1 year ago

there are different telegram apps and both on GitHub:

dabeeeenster commented 1 year ago

I'm referring to the app available on the Mac App Store: https://apps.apple.com/us/app/telegram/id747648890

muescha commented 1 year ago

thats the macos/swift one