View Single Post
Hi

I am trying to write some applescript to extract urls and titles
from OmniWeb. I noticed that the applescript "tab" object only has
an address property. It would have been very useful if it also had a
title property (there would then be no need to change the active tab).

I did a search on the forum and found Jon Hick's site, with an example for this:

tell application "OmniWeb"
set urls to {}
set theBrowser to front browser
repeat with tb in tabs of theBrowser
set active tab of theBrowser to tb
copy {addr:the address of tb, name:the name of theBrowser} to the end of urls
end repeat
log "URLs: " & urls
end tell

Unfortunately, on Leopard using OmniWeb v5.6, I get
an "AppleEvent handler failed"

tell application "OmniWeb"
get browser 1
browser id 12014 of workspace "Default"
count every tab of browser id 12014 of workspace "Default"
10
set active tab of browser id 12014 of workspace "Default" to item 1 of every tab of browser id 12014 of workspace "Default"
"OmniWeb got an error: AppleEvent handler failed."

Is it OK to set the "active tab"? I does not state it is read only.

I have also tried ListWindows / GetWindowinfo, but these methods
only return details about the active tab. I presume these are old
methods, since they are in OmniWeb compatibility commands.

I would be grateful for any help or suggestions.

Many thanks

Brendan