Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.