Re: Dumb Safari question
Re: Dumb Safari question
- Subject: Re: Dumb Safari question
- From: deivy petrescu <email@hidden>
- Date: Sat, 27 Sep 2008 13:15:14 -0400
On Sep 27, 2008, at 8:09, Mark J. Reed wrote:
"only" twelve miles, she says...
Thanks for the help.
Unfortunately, I'm still not there. I'm looking for the X in
tell X to make new tab
which has to be a window object. Calling "make new document" caused a
new visible window to appear, so there must be an associated window
object somewhere, but I don't see how to get to it from the return
value of the make.
Since both documents and windows have names, I thought they might
match, so I tried 'make new document with properties {name: "foo"}'
and then asking for 'some window whose name is "foo"' - which made
Safari crash. :\
Hi Mark.
X is window. Check tabs and you will see that tabs are contained by
window.
So, you are correct.
Now, documents do not have name (check properties of documents),
window does.
However, this is AppleScript, "return name of document 1" will return
its URL.
You can have window that have no documents associated with them.
windows and documents are contained by the application, not by each
other.
What I'm doing, incidentally, is making a script to open all the URLs
tagged with a given label in tabs. This functionality is built in to
the Delicious plugin in Firefox, but DeliciousSafari lacks the
capability.
tell window x
set j to 1
repeat with u in urls
set j to j+1
make new tab
set URL of tab j to u
end
adjust it so that you get what you want. I am assuming tab 1 (or 0) is
fixed and you will not change it.
Deivy
_______________________________________________
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