• 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 Scripting Help (Newbie help)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari Scripting Help (Newbie help)


  • Subject: Re: Safari Scripting Help (Newbie help)
  • From: Martin Orpen <email@hidden>
  • Date: Fri, 28 Dec 2007 16:07:16 +0000

On 28 Dec 2007, at 14:48, Mark J. Reed wrote:

On Dec 28, 2007 5:32 AM, Peter Baxter <email@hidden> wrote:

The full script is:

open location target_URL

Not quite. That needs to be in a Safari tell block, yes?

That'd be confusing for somebody who is new to AppleScript because "open location" isn't in the Safari dictionary.


The OP was close with "get URL" but the terminology is also confusing because the URL in Safari is just a line of text at the top of a document or tab - so:


tell application "Safari" get URL of document 1 end tell


just grabs the URL from the location bar as plain text, whereas:


tell application "Safari" set URL of document 1 to "http://www.pro-imaging.org/"; end tell


will do what they want just using terms from the Safari dictionary.

Using "open location" works, but the OP will need to take a look at the Standard Additions dictionary and understand that using it outside of a Safari tell block will cause his default browser to open the page - which may not be Safari.

--
Martin Orpen
Idea Digital Imaging Ltd


_______________________________________________ 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: Safari Scripting Help (Newbie help)
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Safari Scripting Help (Newbie help) (From: John Koch <email@hidden>)
 >Re: Safari Scripting Help (Newbie help) (From: Peter Baxter <email@hidden>)
 >Re: Safari Scripting Help (Newbie help) (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Safari Scripting Help (Newbie help)
  • Next by Date: Re: Safari Scripting Help (Newbie help)
  • Previous by thread: Re: Safari Scripting Help (Newbie help)
  • Next by thread: Re: Safari Scripting Help (Newbie help)
  • Index(es):
    • Date
    • Thread