• 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 URL of front web page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting URL of front web page


  • Subject: Re: getting URL of front web page
  • From: Philippe GRUCHET <email@hidden>
  • Date: Thu, 27 Mar 2003 07:07:48 +0100

From: OzSprings <email@hidden>

Is is possible to Applescript copying the URL of the frontmost web page from Safari (which is what I am using) or another browser?

(Apple's SE2 / Mach-O 10.2.4)

Safari, front window:

tell app "Safari"'s front document to set x to URL
-- then, do what you want with x, such:
--open location x
----------------------------------------------------------

Explorer 5.2.2, all windows (URLs and POSIX files):

tell application "Internet Explorer"
set {x, textHolder} to {ListWindows, ""}

repeat with y from 1 to items's number in x
text 1 of (GetWindowInfo item y of (ListWindows))
set textHolder to result & return & return & textHolder
end repeat
end tell

-- below, change the presentation like you need:
set textHolder to textHolder's text 1 thru -3
----------------------------------------------------------


Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
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.

  • Prev by Date: Re: Script to Copy/Paste Entourage Message Bodies
  • Next by Date: Re: getting URL of front web page (addendum)
  • Previous by thread: Re: getting URL of front web page (addendum)
  • Next by thread: GUI scripting hiccup
  • Index(es):
    • Date
    • Thread