Re: Safari Scripting Help (Newbie help)
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