Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

perper

macrumors newbie
Original poster
Dec 15, 2009
2
0
Hi, i was wondering if its possible in the Cocoa or CGWindow api to access the current window and resize/set bounds?
 

perper

macrumors newbie
Original poster
Dec 15, 2009
2
0
but is there any way to resize/move a window that is not in the same process?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,706
8,345
A sea of green
but is there any way to resize/move a window that is not in the same process?

See this recent thread:
https://forums.macrumors.com/threads/807225/

There is no more direct API because that would violate security constraints, which isolate processes from one another unless they agree to accept requests from other processes. That agreement takes the form of an AppleScript scripting dictionary. The dictionary describes those things that other processes can manipulate. Things not in the dictionary can't be externally manipulated. There may be exceptions to this in some cases, but it is the general guiding principle.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.