How to resize a window of any application programmatically with objective-c / cocoa? So far I've got the app name and the window number but don't know how to access the window.
I could do it with AppleScript but want to learn it with objective c.
AppleScript example:
tell application "System Events"
set frontApp to name of first application process whose frontmost is true
end tell
tell application frontApp
set bounds of window 1 to {(screenWidth / 2), 0, screenWidth, screenHeight}
end tell
Thanks for any advice.