user635064
user635064

Reputation: 6247

Applescript and Cocoa window positions

I know that using Applescript I can change the size and position of any application's window, but is it possible to get a notification whenever a window has changed it size or position?

If thats not possible, then what I was thinking was making a thread in the background, and constantly check the positions of windows and see if they have changed, if they did then they moved.

But that would take a lot of cpu resources to constantly compare the positions/sizes of window. So is it possible? If not , is there a better way? Thanks!

Upvotes: 0

Views: 344

Answers (1)

lbrndnr
lbrndnr

Reputation: 3389

I'm not sure but i think there isn't a notification for that. I would listen for mouse events. When the mouse was dragged you can check the windoews for changes. Hope that helpa.

Upvotes: 1

Related Questions