tab urls and titles via applescript
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 |
Bumping old thread!
I'm having this problem too. Any info? [i]Edit:[/i] For now I'm using System Events to send command-down-arrow, etc. But that's silly. |
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. |
All times are GMT -8. The time now is 02:57 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.