• 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 Scripting Help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari Scripting Help


  • Subject: Re: Safari Scripting Help
  • From: Peresh <email@hidden>
  • Date: Wed, 2 Jan 2008 12:20:44 +0530

Hi John,

I hope this would help you to some extent. 


I am having much trouble with my Scripting ablities at the moment I
want to have a script open "Script Editor" and "Safari" but have
safari go to a certain URL (this is how far I got)

tell application "Script Editor"
activate
end tell

tell application "Safari"
activate
get URL --Dont know what to put here, I have looked through
dictionary and can't find anything
end tell


As we can see in the dictionary, the keyword ' URL' is contained by ' tab' which is contained by ' window '.
Try this an example..

tell application "Safari"
activate
get URL of tab 1 of window 1
end tell

which gives the url in the first tab of the first window of safari application.

or simply

tell application "Safari"
activate
get URL of tab of front window
end tell

which gives the urls of all the tabs in the front window ( window 1) of application safari ( if there are more than one tab opened.).



-Peresh




 _______________________________________________
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

  • Prev by Date: Re: Newbie help needed: capturing keypress to record QuickTime timing
  • Next by Date: Re: Newbie help needed: capturing keypress to record QuickTime timing
  • Previous by thread: Re: how can i hide an app?
  • Next by thread: Re: Newbie help needed: capturing keypress to record QuickTime timing
  • Index(es):
    • Date
    • Thread