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?
|