Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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/

like image 274
MatterGoal Avatar asked Jan 22 '26 10:01

MatterGoal


2 Answers

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.

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

like image 35
Sneakyness Avatar answered Jan 25 '26 03:01

Sneakyness