MatterGoal
MatterGoal

Reputation: 16430

how moom for osx works?

I'm trying to figure out how moom can modify window of other applications. I mean, it can change dimensions of other NSWindow object but i really can't understand where it get window list and how it can access their frames.

Is there a way to access other apps execution with something like:

NSArray *windows = [NSSystem allApplication]windowList]; 

You can find a free version of moom here http://manytricks.com/moom/

Upvotes: 3

Views: 298

Answers (2)

user149341
user149341

Reputation:

Most tools like this work through the Accessibility API. This is exposed in AppleScript as the "System Events" application, but you'll probably get better results using it directly. Note that the user will have to "Enable access for assistive devices" (in the Universal Access prefpane) to allow your application to do this.

Upvotes: 3

Sneakyness
Sneakyness

Reputation: 5403

As far as I know, the best way to accomplish anything of this nature is via AppleScript. I hear a lot of people complain about it, but it's really powerful.

Here's an example script I found

Upvotes: 1

Related Questions