Rearrange desktop apps/windows

I’ve written and regularly use several scripts that rearrange apps/windows on the desktop, and the actual rearranging work is done by a handler that uses the System Events’ position and bounds properties. The scripts work as I want but tend to be a bit slow.

I ran some timing tests with four open apps, and one script takes about 330 milliseconds. However, with the System Events handler disabled, the timing result is about 8 milliseconds. So, to make the script faster, I have to find an alternative to System Events. Is there some ASObjC method that will do this? Thanks.

Maybe NSWorkspace ?

https://developer.apple.com/documentation/appkit/nsworkspace?language=objc

You ran register for running Applications notifications
From its own Notification Center

That will give you a list of NSRunningApplications.
You might be able to access their NSWindows?

NSRunningApplication inherits from NSApplication
https://developer.apple.com/documentation/appkit/nsrunningapplication?language=objc

Thanks technomorph. I’ll take a look at those.