The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniWeb > OmniWeb General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

tab urls and titles via applescript Thread Tools Search this Thread Display Modes

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"
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

Bumping old thread!

I'm having this problem too. Any info?

Edit: For now I'm using System Events to send command-down-arrow, etc. But that's silly.

Last edited by ata; 2008-03-25 at 11:34 AM..
I've filed a bug on this sorry for the inconvenience.
It's still a bug in 5.9 on 10.5.6. The following gives an AppleEvent failure:

set the active tab of the front browser to the last tab of the front browser

and many permutations on the relevant vocabulary do the same. What's particularly irksome is that it leaves no way in applescript to create a new tab at the end of the a browser's current ones then make that one the active one for that browser. It worked in OW 5.0, April 2005 and possibly later than that.

Last edited by MLModel; 2009-03-09 at 04:22 PM..

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Section Titles in Printouts ronbailey OmniOutliner 3 for Mac 2 2009-07-29 09:24 AM
Only Searching Project Titles SpiralOcean OmniFocus 1 for Mac 1 2007-05-10 06:20 AM
Can't save Don't Print Titles Roger Barre OmniOutliner 3 for Mac 1 2007-01-17 12:40 PM
Any way to get rid of the white box to the right of the column titles? AlanY OmniOutliner 3 for Mac 1 2006-06-09 10:31 AM
Workspaces and Tab Drawer Titles ssanchez OmniWeb Feature Requests 0 2006-06-01 02:40 PM

All times are GMT -8. The time now is 12:15 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.