logoalt Hacker News

saagarjhalast Friday at 12:44 PM1 replyview on HN

You don't actually need to send CGEvents to UI elements to make them do things ;)


Replies

krackerslast Friday at 6:19 PM

Could you elaborate on what you mean? My understanding of the Cocoa event loop was that ultimately everything is received as an NSEvent at the application layer (maybe that's wrong though).

Do you mean that you can just AXUIElementPerformAction once you have a reference to it and the OS will internally synthesize the right type of event, even if it's not in the foreground?

show 1 reply