The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniWeb General (http://forums.omnigroup.com/forumdisplay.php?f=8)
-   -   Extracting title and URL (http://forums.omnigroup.com/showthread.php?t=4895)

Doug Pinkerton 2007-09-17 09:08 AM

Extracting title and URL
 
I prefer to keep bookmarks in a database. I need to build an AppleScript that will extract the title and URL from the current page, and copy them to the clipboard as a single text string with the URL in brackets, like this:

The Omni Group <http://www.omnigroup.com/>

I don't know enough about AppleScript to make this happen. Can someone help?

Thanks,
dp

Vician 2007-09-17 02:30 PM

I'm not great at AppleScript, I've only wrote one for VisualHub thus far, but this does what you want:

tell application "OmniWeb"
set bookInfo to GetWindowInfo
set the clipboard to item 2 of bookInfo & " <" & item 1 of bookInfo & ">"
end tell

Doug Pinkerton 2007-09-17 03:36 PM

[QUOTE=Vician;21300]I'm not great at AppleScript, I've only wrote one for VisualHub thus far, but this does what you want:

tell application "OmniWeb"
set bookInfo to GetWindowInfo
set the clipboard to item 2 of bookInfo & " <" & item 1 of bookInfo & ">"
end tell[/QUOTE]
That got it. Thanks, Vician.


All times are GMT -8. The time now is 09:49 AM.

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