• 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: Activate a Window in Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Activate a Window in Safari


  • Subject: Re: Activate a Window in Safari
  • From: daniel <email@hidden>
  • Date: Sat, 11 Dec 2004 09:25:16 -0800

I was intrigued by this so I looked into it. Here is a javascript-based workaround that does seem to do the trick:

tell application "Safari"
set theDocument to document 2
do JavaScript "window.focus();" in theDocument
end tell

On Dec 10, 2004, at 2:00 PM, Christopher Stone wrote:

At 12:41 -0600 12/10/2004, David Durkee wrought:

After looking around for a way to activate a window in Safari from AppleScript, I finally hit on setting its index to 1. This brings it to the front but leaves keyboard focus on the previously frontmost window. Anybody know of a way to really activate a window in Safari, short of GUI scripting?
______________________________________________________________________

Hey David,

This is a nasty bug I reported months ago.

I never found a work-around, but I wouldn't be surprised if it could be done with Javascript.

Can one of the JS-literate types on the list give us a clue on this?

Thanks.


Chris


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Activate a Window in Safari (From: David Durkee <email@hidden>)
 >Re: Activate a Window in Safari (From: Christopher Stone <email@hidden>)

  • Prev by Date: Renaming file bug
  • Next by Date: Re: Image Events Errors
  • Previous by thread: Re: Activate a Window in Safari
  • Next by thread: List Archives & email addresses
  • Index(es):
    • Date
    • Thread