3 ms·
> Don't do this. Use AppleScript to watch for changes, instead of polling. Could you provide more info about this, or even better, an actionable code example?
by runjake 9y ago
> Don't do this. Use AppleScript to watch for changes, instead of polling.
Could you provide more info about this, or even better, an actionable code example?
- saagarjha 9y agoI'm on mobile, so I can't write code for you (plus, the code is going to be ugly since it relies on a C framework). However, I can give you some pointers; one, you'll need to create some sort of app, since it will need to continuously run with a run loop. You'll want to look into the Accessibility/OSA APIs and register an AXObserver.