Re: Open Safari and Script
Re: Open Safari and Script
- Subject: Re: Open Safari and Script
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 29 Dec 2007 14:36:37 -0500
On Dec 29, 2007 1:26 PM, Michelle Steiner <email@hidden> wrote:
> The OP said he wanted to have only that one window open; that's the
> reason I put in the "close windows" bit.
Right. I was just exploring the alternatives that had been presented.
> I have my default new page set to be an empty page, but even so, it
> has a name of "untitled" and I never ran into that race condition when
> developing the script for him.
The way I understand the problem, I think that's more of a "that's
why" than an "even so". Since you have your default new page set to
be an empty page, it doesn't change after the "make new document", so
there is no race condition. If you have your default new page set to
some URL, then the race condition appears - Safari creates a blank
page, returns a reference to it, and then loads the home page URL; if
it finishes loading it before it gets the instruction using the blank
page's reference, then the blank page will be gone and you get an
error.
All of the foregoing is AIUI from the discussion; I haven't done any
testing to confirm.
--
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