• 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: Getting the URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the URL


  • Subject: Re: Getting the URL
  • From: Bill Briggs <email@hidden>
  • Date: Thu, 19 Jul 2007 09:45:01 -0300

At 11:53 AM +0200 7/19/07, Emmanuel wrote:
>At 2:12 PM -0700 7/18/07, Mike wrote:
>>Is there a standard way in AppleScript to get the current URL from the active window in a web browser?
>
>There is not one technique for all browsers. I know for two Webkitters, Safari:
>
>tell app "Safari" to get URL of document 1
>
>and Smile:
>
>tell app "Smile" to get path name of window 1

Here's another, iCab, and any variant of the syntax works

tell application "iCab"
	-- activate
	set currURL to URL of window 1
	set currURL to URL of front window
	set currURL to URL -- this also works, though it doesn't have a complete reference and application doesn't have a URL element
end tell

- web
 _______________________________________________
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

References: 
 >Getting the URL (From: Mike <email@hidden>)
 >Re: Getting the URL (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: UI Scripting of Acrobat Pro
  • Next by Date: Re: Getting the URL
  • Previous by thread: Re: Getting the URL
  • Next by thread: Re: Getting the URL
  • Index(es):
    • Date
    • Thread