• 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: Swap foreground and background windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swap foreground and background windows


  • Subject: Re: Swap foreground and background windows
  • From: Quark67 <email@hidden>
  • Date: Sun, 24 May 2009 23:55:58 +0200


Le 24 mai 09 à 23:20, Michelle Steiner a écrit :

On May 24, 2009, at 1:54 PM, Quark67 wrote:

I will made "Sans Titre 3" in background and "Sans titre" in foreground.

This works:

tell application "TextEdit"
set win1 to id of the first window
set win3 to id of the third window
set index of window id win1 to 3
set index of window id win3 to 1
end tell

-- 

I'm sorry, when I click on TextEdit on the dock, this give me windows as on the third screenshoot. 
But I'm on Leopard. Are you too? If yes, what happens?

Yes, I'm on Leopard.  

The problem with the Dock is something unrelated to the script.  For some reason, clicking on the Dock (or otherwise activating the application) will make the most recently created open window the front window.

-- Michelle

--
Homosexuals do not recruit; Christians recruit, and so does the military.

Ok, but how can I do? How can I return to TextEdit after the script was running, and keep the new order of the windows?
I fact, it seems that the older foreground window keep the "focus". 
But, as you see I my first message, I tryed to place the focus on the new foreground window, but this don't run...
How can I made so?
In System Event dictionary, I read this :
UI element n [inh. item] : A piece of the user interface of a process
properties
focused (boolean) : Is the focus on this UI element?

But how can I use this? 

 _______________________________________________
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

  • Follow-Ups:
    • Re: Swap foreground and background windows
      • From: Michelle Steiner <email@hidden>
References: 
 >Swap foreground and background windows (From: Quark67 <email@hidden>)
 >Re: Swap foreground and background windows (From: Michelle Steiner <email@hidden>)
 >Re: Swap foreground and background windows (From: Quark67 <email@hidden>)
 >Re: Swap foreground and background windows (From: Michelle Steiner <email@hidden>)

  • Prev by Date: RE: Swap foreground and background windows
  • Next by Date: Re: Swap foreground and background windows
  • Previous by thread: Re: Swap foreground and background windows
  • Next by thread: Re: Swap foreground and background windows
  • Index(es):
    • Date
    • Thread