views:

656

answers:

2

Hi,

for some application I would like to have an "instance" of it running in Space (Apple's workspace) 4 and another one in number 2. How can I somehow tell (in bash/applescript or whatever) to an instance of an application, to "move" to Space number N? Applescript? Bash? External app?

I want to do this automatic and for a lot of different apps. So using the mouse or assigning applications in preferences does not work for me.

Is it possible?

Thanks

+1  A: 

Short answer: you can't unless you make more than one copy of the application and change its bundle identifier (not recommended for lots of reasons). Spaces works on an application basis, not a per-instance basis (which is uncommon on OS X for GUI apps anyway) nor on a per-window basis of an app.

Ned Deily
Ned, thanks a lot for your valuable help but i am giving up. Unfortunately this tasks seems impossible. In Linux it would be o problem, as the way of how to do this is for sure well documented and open source. thanks
Werner
the question for me is: for a given progem, i.e. safari, how to open, programatically two windows in different spaces
Werner
I think people understand your question. The answer remains: you can't, using Spaces scripting interface; you have to move the window after it is created. Spaces was something that was added to OS X in a fairly recent release (10.5) and, unfortunately, wasn't designed to accommodate this. To make it really work might require application changes as well. Sorry!
Ned Deily
Hi Ned, I found a workaround for my general problem. It's so basic ...I an script I store all apps taht I need to open with their respective documents or input files. WHen it is prepared, I just go to the space number that I want, and I run it there. Voilà. So obiusthanks for the help
Werner
+1  A: 

To move an already open window into another space click and hold on the window's title bar and then do ctrl-NUM_KEY_OF_SPACE. So, to move a window to space #2 use click+hold the title bar and press ctrl+2. Too bad this shortcut (even with other modifier keys) doesn't work on the window currently in focus.

cadience
Doesn't answer the question, but good to know. Thanks!
Jon Freeland