• 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: Safari Reload
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari Reload


  • Subject: Re: Safari Reload
  • From: Gil Dawson <email@hidden>
  • Date: Thu, 26 Jan 2012 10:52:09 -0800

Excellent!  Great idea!  Thanks, Joe.  --Gil


On Jan 25, 2012, at 9:00 PM, Joe wrote:

On Jan 25, 2012, at 7:14 PM, Gil Dawson wrote:

Anyone know how to tell a Safari document to reload?

This works...

tell application "System Events" to tell process "Safari" to keystroke "r" using {command down}

...but it requires making the window frontmost and the tab visible.   In a particular application I'm writing for a client, it would be nice not to have to do that.

--Gil


Try this:

tell application "Safari"
do _javascript_ "_javascript_:location.reload(true)" in current tab of window 1
end tell

 _______________________________________________
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: 
 >Safari Reload (From: Gil Dawson <email@hidden>)
 >Re: Safari Reload (From: Joe <email@hidden>)

  • Prev by Date: Re: repeat while or delay
  • Next by Date: Re: repeat while or delay
  • Previous by thread: Re: Safari Reload
  • Next by thread: scripting the dictionary app
  • Index(es):
    • Date
    • Thread