Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 22, 2010, 11:41 AM   #1
vadym.hulakov
macrumors newbie
 
Join Date: Oct 2010
Change position of another app's window

I am using python and pyobjc. I need to change position of another app's window.

Information I have is title of window. Also I can get window number by using Quartz.CGWindowListCopyWindowInfo().
vadym.hulakov is offline   0 Reply With Quote
Old Oct 22, 2010, 02:25 PM   #2
ulbador
macrumors 68000
 
ulbador's Avatar
 
Join Date: Feb 2010
As the "quick and dirty way", I would probably just call a shell script. You just would execute the command "osascript". You can make osascript tell the application or even the Finder to close or move windows.
ulbador is offline   0 Reply With Quote
Old Oct 23, 2010, 05:25 AM   #3
vadym.hulakov
Thread Starter
macrumors newbie
 
Join Date: Oct 2010
Quote:
Originally Posted by ulbador View Post
As the "quick and dirty way", I would probably just call a shell script. You just would execute the command "osascript". You can make osascript tell the application or even the Finder to close or move windows.
I think that "quick and dirty way" is ok for this case. But I have problems with osascript. I use command:

osascript -e 'tell application "FooApp" set bounds of window 1 to {100, 100, 500, 500}'

I get error "execution error: FooApp got an error: Can't set bounds of window 1 to {100, 100, 500, 500}. (-10006).

Interesting that this command work fine for TextEdit

osascript -e 'tell application "TextEdit" set bounds of window 1 to {100, 100, 500, 500}'

What do I need to do make my application compatible with osascript?
vadym.hulakov is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Change location of iPhone/iPod backups? Nihaochan OS X 20 Mar 20, 2014 05:34 AM
Control Another App's Windows Blakeasd Mac Programming 6 Oct 30, 2011 02:26 PM
Can I change size of Boot Camp Windows XP Drive? markw10 Windows, Linux & Others on the Mac 2 Jan 22, 2007 07:58 PM
Changing icon of Boot Camp Windows HD barr08 Mac Basics and Help 4 Aug 23, 2006 09:10 PM
How do I change the position of the top right corner icons? TWLreal OS X 12 Jul 9, 2006 08:24 PM


All times are GMT -5. The time now is 01:54 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC