Re: Getting the URL
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