Mailing Lists: Apple Mailing Lists

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

Test to see if web browser can run java script...



Hi, 

I have written a script to test to see if a web browser can run java
script my calling the "do script" or "do JavaScript" methods contained
within a browsers dictionary.

I have managed to write a script that works for Safari and Internet
Explorer, but I cant figure out how to write a script for OmniWeb v5.1

I will use the Internet Explorer script as an example because both
OmniWeb and Internet Explorer use the "do script" command where as
Safari uses the "do AppleScript" command.
I would like to port the script below so it will work with OmniWeb v5.1.

Here is the script for Internet Explorer:

try
	run script "tell application \"Internet Explorer\"
CloseAllWindows
 do script  \"window.name\" window -1
 end tell"
	
	return true
	
on error
	return false
	
end try


try
	run script "tell application \"Internet Explorer\"
quit application
end tell"
end try

Cheers for help, 

Thank you kindly,

David Siberry
 _______________________________________________
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

This email sent to 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.