• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Move multiple windows from 1 application to different spaces?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move multiple windows from 1 application to different spaces?


  • Subject: Re: Move multiple windows from 1 application to different spaces?
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 27 Oct 2010 22:52:09 +1100


On 27/10/2010, at 9:27 PM, Steve Thompson wrote:

set app_ident to bundle identifier of (info for ((POSIX path of (path to applications folder) as string) & "Safari.app"))
set app_ident to "|" & app_ident & "|"
tell application "System Events"
if the name of window 1 of process "Safari" is "NameOfCollegeClass" then
tell spaces preferences of expose preferences
set app_layout to application bindings
set app_layout to app_layout & {app_ident:2} -- move Safari to space 2
set application bindings to app_layout
end tell
end if
end tell

Steve, this doesn't work, at least under 10.6.4

It returns    {app_ident:2, |com.vmware.fusion|:1}

with this.....

global app_ident

set app_ident to bundle identifier of (info for ((POSIX path of (path to applications folder) as string) & "Safari.app")) as text
set app_ident to "|" & app_ident & "|"
tell application "System Events"
--if the name of window 1 of process "Safari" is "NameOfCollegeClass" then
tell spaces preferences of expose preferences
set app_layout to application bindings
set app_layout to app_layout & {app_ident:2} -- move Safari to space 2
set application bindings to app_layout
end tell
end tell
tell application "System Events"
tell spaces preferences of expose preferences
set tt to application bindings
tt
end tell
end tell

The vertical lines tell the script to transfer the variable app_ident as a literal.

Regards

Santa

And what, you ask, was the beginning of it all?
And it is this......
Existence that multiplied itself
For sheer delight of being
And plunged with numberless trillions of forms
So that it might
find
itself
innumerably

Sri Aurobindo





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Move multiple windows from 1 application to different spaces? (From: Greg Evans <email@hidden>)
 >Re: Move multiple windows from 1 application to different spaces? (From: Steve Thompson <email@hidden>)

  • Prev by Date: Re: Move multiple windows from 1 application to different spaces?
  • Next by Date: Re: odd appscript problem
  • Previous by thread: Re: Move multiple windows from 1 application to different spaces?
  • Next by thread: Re: odd appscript problem
  • Index(es):
    • Date
    • Thread