Quote:
Originally Posted by forum member
I'm running both lines and neither one works for me. Can you tell me what I'm doing wrong?
tell app "OmniWeb"
activate
set theURL to the address of tab
end
tell app "OmniWeb"
activate
set theURL to the address of browser
end
|
What I did was modify the Safari script for OmniWeb. Here is the script to make a webarchive:
Code:
-- Add web archive from OmniWeb to DEVONthink
tell application "OmniWeb"
try
if not (exists browser 1) then error "No browser is open."
set this_url to address of browser 1
set this_title to the name of browser 1
tell application "DEVONthink Pro"
set theArchive to create record with {name:this_title, type:html, URL:this_url}
try
with timeout of 60 seconds
set data of theArchive to download web archive from this_url
end timeout
on error
error "Download failed."
end try
end tell
on error error_message number error_number
if the error_number is not -128 then
try
display alert "OmniWeb" message error_message as warning
on error number error_number
if error_number is -1708 then display dialog error_message buttons {"OK"} default button 1
end try
end if
end try
end tell