• 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: AppleScript for adding JavaScript to a page which is getting loaded
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript for adding JavaScript to a page which is getting loaded


  • Subject: Re: AppleScript for adding JavaScript to a page which is getting loaded
  • From: Emmanuel <email@hidden>
  • Date: Fri, 22 Jun 2007 15:11:07 +0200

At 2:19 AM -0700 6/22/07, Atif Zia wrote:
What i want to do, is add certain JavaScript code to all the webpages that gets loaded in the Safari. can it be done using AppleScript?

Yes, via Safari's "do JavaScript" AppleScript command. Make the Javascript to add a new <script> tag to the current document's header or body, then use "do JavaScript" to have it run in Safari's front window.


One more thing can i parse through the contents of a webpage and extarct some useful information and associate something with them so that when they are clicked they are sent to some other apllication?

There are tons of ways to do that, I suppose. We, the makers of Smile (an AppleScript-based platform), have set Smile to be called when the user clicks a link starting with "smile://". This is documented at:
http://www.satimage-software.com/en/html_interface.html


Emmanuel
Satimage-software
_______________________________________________
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: 
 >AppleScript for adding JavaScript to a page which is getting loaded (From: Atif Zia <email@hidden>)

  • Prev by Date: Re: get/set mouse location
  • Next by Date: Re: 'do JavaScript' still broken in Safari 3 beta
  • Previous by thread: AppleScript for adding JavaScript to a page which is getting loaded
  • Next by thread: Re: AppleScript for adding JavaScript to a page which is getting loaded
  • Index(es):
    • Date
    • Thread