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

 
OmniWeb Applescript Support (for DevonThink) Thread Tools Search this Thread Display Modes
I was just over in the DevonThink forums looking for applescripts that will capture pages and web archives from OmniWeb and put them into DevonThink (they have similar scripts for Safari). According to DevonThinks main developer:
I've just checked the latest build of OmniWeb 5.5 - it's still not possible to get the source or web archive of a browser or tab via AppleScript.
Is that something you would think of adding to OW 5.5? Thanks.

DougRay
 
I saw the post on the DevonThink forums from Christian (the programmer and administrator) and replied there. The DT 'capture to rich note' service .. with the default key cmd+) works just fine for me in SP17 and worked in SP16 too. That's one reason I'm using OW again as my default browser.

I don't know why it's not yet working in every case. But I can tell you that I 'clean installed' SP17 (dumped the prefs folder, the cache etc).
 
Yeah, I saw your post, but I was wondering more about the applescripts that DevonThink uses to capture full pages and web archives from a web browser (like it does for Safari). Do they use a similar mechanism as the Services menu or are they still hindered by some lack of script support in Omniweb? Thanks.
 
Bringing back a thread I didn't find an answer for.

I'm trying out DEVONthink, and am attempting to modify the script that stores a web page in the database.

The Safari script uses:
set this_url to the url of document 1
The dictionary of OmniWeb doesn't appear use the same terms. From what I understand (probably don't) OmniWeb would use something like:
set this_url to the address of browser
or
set this_url to the address of tab
Neither work, and not being very versed in AppleScript, I'm now stumped on how to extract the URL being displayed in OmniWeb and getting it into a variable.

Anyone have a working script?
 
Never mind. As usual, it was a short between the ears. I was running the script without OmniWeb first having had focus. Dumb, dumb, dumb.
 
Quote:
Originally Posted by Terry
Never mind. As usual, it was a short between the ears. I was running the script without OmniWeb first having had focus. Dumb, dumb, dumb.
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
 
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
 
Also, the easiest way to add a link or archive is by using the Bookmarklets included in the dmg file. I added them to my bookmark bar, then just click either one. That's about as simple as it can get.
 
elegant solution: Cocoa Suite offers the ability to create shortcuts for any menu option, also for service menu options like DEVONthink Pro
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript for Exporting Action/Project to DEVONThink Pro millerj Applying OmniFocus 11 2010-09-08 08:42 AM
AppleScript support wish list philb OmniWeb Feature Requests 0 2008-02-16 02:24 PM
OmniWeb support in OmniFocus? globetrotterdk OmniFocus 1 for Mac 10 2007-11-23 08:58 AM
vote for Omniweb support in 1passwd vinyl_warrior OmniWeb General 10 2006-12-26 06:50 PM


All times are GMT -8. The time now is 11:02 AM.


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