Re: Safari Scripting Help (Newbie stuff) Complete!
Re: Safari Scripting Help (Newbie stuff) Complete!
- Subject: Re: Safari Scripting Help (Newbie stuff) Complete!
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 28 Dec 2007 16:23:12 -0500
On Dec 28, 2007 1:48 PM, Peter Bunn <email@hidden> wrote:
> tell application "Safari"
> activate
> try
> set _exists to document 1
> tell front document
> set URL to "http://www.google.com"
> end tell
> on error
> make new document
> tell front document
> set URL to "http://www.google.com"
> end tell
> end try
> end tell
Yeah, that was what I thought. But - and I realize we're down to
aesthetics at this point - why duplicate the "tell front document"
block?
tell application "Safari"
activate
try
set _exists to document 1
on error
make new document
end
tell front document to set URL to "http://www.macscripter.net/"
end
--
Mark J. Reed <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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden