Objective C - how to resize a window programmatically with given window id? -


How to change the window of any program with objective-c / cocoa? So far I have got the app's name and window number but I do not know how to use the window.

I can do it with the Apple script, but I want to learn it with purpose.

AppleScript example:

  Tell the application "System Events" First set the front-end in the name of the application process, whose biggest true end is, tell that the app in front of the application Specify the set window range 1 to {(Screenshoot / 2), 0, screenwidth, screenhit} end  

Thanks for any advice.

In this case, the Apple script is actually the right tool for the job, to change its window size. Speaking to another application is an automation problem. Writing that code in "cocoa" means only sending less work to building / Apple Avent.

I will try to load and execute that script from within a coco program. If you learn how to do this, then how will you embed the applet in your purpose-oriented programs, and this There is an easy move in the belt of your utility.

Good luck!


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -