View Full Version : AppleScript broken in OmniWeb 5.5?
vocaro
04-06-2006, 03:17 PM
I didn't see anything in the release notes about AppleScript support. I have a script that worked in OmniWeb 5.1 but doesn't seem to work at all in 5.5sp3. See:
http://www.omnigroup.com/mailman/archive/omniweb-l/2006/019846.html
Here's a movie to test with:
http://www.ijrr.org/contents/25_03/abstract/geng/extension2.mpeg
When I load the above movie in OW 5.5, then run the script, I get an NSInternalScriptError. This doesn't happen in OW 5.1. (It correctly launches QuickTime.)
Lizard
04-11-2006, 11:10 AM
Thanks for the clear repro steps! I saw the same behavior on my own machine and filed a bug with a few more details -- hopefully our engineers will figure it out soon.
Another AppleScript that is broken in 5.5 that used to work in 5.1.3 is this one:
http://homepage.mac.com/jtyzack/.Public/scpt.zip
(N.B. that link will download a zipped archive of the script). It is the "Open URL in another browser" script that someone posted to the mailing list a while ago. It should grab the URL of the front page in OmniWeb and present a dialogue to pick another browser to open it in (which, if it worked, would be really useful to aid testing of the sp versus other browsers!! ;) ). With 5.5 sp3 no dialogue ever appears.
The "Open URL in another browser" applescript works for me in sp6.
But this does not. It's a script for Adium to insert the front URL from OW into chat; worked in 5.1.3. (Incidentally, one gets it to work with the Safari button by saving this as "Safari.scpt" and placing it into Adium.app/Contents/Resources.)
The part of the script that doesn't work is the "name of front browser".
on substitute()
tell application "System Events"
if ((application processes whose (name is equal to "OmniWeb")) count) is greater than 0 then
using terms from application "OmniWeb"
tell application "OmniWeb"
if (count of browsers) is greater than 0 then
set linkHTML to "<HTML><A HREF=\"" & (address of front browser) & "\">" & (name of front browser) & "</A></HTML>"
return linkHTML
else
return ""
end if
end tell
end using terms from
else
return ""
end if
end tell
end substitute
Patou
04-27-2006, 03:01 PM
I have the same behavior with all my scripts each time they call the "front browser".
e.g. if I have a script with:
set mainBrowser to front browser
when I run it I get an error message saying that the variable mainBrowser is not defined.
Hmm.
I guess I wasn't that clear in my post. "front browser" works in the script (since it works in "address of front browser"), but it doesn't seem to have a "name".
The "Open URL in another browser" applescript works for me in sp6.
Confirmed - it now works for me in sp7 (I missed sp6).
This is strange. It doesn't seem like anything has changed, but the "Count tabs" script (from here (http://wootest.net/omniweb-tabs-script/)) that was working for me earlier (with sp7) no longer works.
"count (tabs of front browser)" brings up the error "NSOperationNotSupportedForKeyScriptError"
Patou
06-08-2006, 10:18 AM
Hello,
I would like to know if anyone has an update on the status of this AppleScript bug, as it still doesn't work in SP14. Sorry to bother you if you were already working on it, but I was a little worried as it never made it to the known issues list.
Thanks
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.