• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Safari: getting name of document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari: getting name of document


  • Subject: Re: Safari: getting name of document
  • From: Oz Springs <email@hidden>
  • Date: Sat, 30 Aug 2003 16:18:16 +0100

At 09:13 -0400 30/8/03, Paul Skinner wrote:
>Curiously...
>
>tell application "Safari"
> name of front window-->"MacSlash: A daily dose of Macintosh News and Discussion"
>end tell
>
> Unfortunately Google is open in the front window. Safari has no script accessible property to identify which of it's windows is frontmost. It does have a 'frontmost' property, but this refers to the application.
>
>PS
...
>Curiously "name of front document" doesn't work; it results in a missing value.
>
>Try "name of front window"
>
>
>Best Regards,
>

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).

Thanks for any help




Oz
_______________________________________________
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.

  • Follow-Ups:
    • Re: Safari: getting name of document
      • From: Rob Jorgensen <email@hidden>
References: 
 >Re: Safari: getting name of document (From: Paul Skinner <email@hidden>)

  • Prev by Date: Filter reference forms broken in OS X Finder?
  • Next by Date: Re: Safari: getting name of document
  • Previous by thread: Re: Safari: getting name of document
  • Next by thread: Re: Safari: getting name of document
  • Index(es):
    • Date
    • Thread