Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

452 B
Raw Blame
import CoreGraphics
let list = CGWindowListCopyWindowInfo([.optionAll], kCGNullWindowID) as! [[String: Any]]
for w in list { let o = w[kCGWindowOwnerName as String] as? String ?? "?"; let pid = w[kCGWindowOwnerPID as String] as? Int ?? 0
 if pid == Int(CommandLine.arguments[1])! { let b = w[kCGWindowBounds as String] as! [String: Any]; print(o, w[kCGWindowNumber as String]!, b["Width"]!, b["Height"]!, w[kCGWindowIsOnscreen as String] ?? false) } }