Re: Safari: getting name of document
Re: Safari: getting name of document
- Subject: Re: Safari: getting name of document
- From: Rob Jorgensen <email@hidden>
- Date: Sat, 30 Aug 2003 11:32:13 -0400
At 4:18 PM +0100 8/30/03, Oz Springs wrote:
Chris & Paul:
Thank you for this. My working script is now:
tell application "Safari"
set theURL to URL of the front document
set theName to name of front window
set theText to text of the front document
tell application "FileMaker Developer"
set field "gURL" to theURL
set field "gName of Source" to theName
set field "gText of Source" to theText
end tell
end tell
It works in Script Editor. However, when I try to paste it into a
script in FileMaker, I get an error message:
Can't get the application's event dictionary. (Error -2709)
and FMP highlights the quote mark after Safari. This is strange
because that line was in the earlier script and it worked fine. I
have closed out of Script Debugger which had Safari's dictionary
open (though having it open should not make any difference).
What happens if you move the FileMaker Developer block outside of the
Safari block?
tell application "Safari"
set theURL to URL of the front document
set theName to name of front window
set theText to text of the front document
end tell
tell application "FileMaker Developer"
set field "gURL" to theURL
set field "gName of Source" to theName
set field "gText of Source" to theText
end tell
-- Rob
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.