Hi,
I have no real training in Applescript, but I’ve tried tweaked scripts before, and I’ve tried my best to make this thing work for me. So far I haven’t succeeded.
I’ve got a bunch of Web Archives I want to change to PDF without losing the tags. I’m happy to “re-download” the data from the URL contained in the Web Archive…in fact, that seems to be the most straightforward route. But I can’t figure out how to get the tags to transfer over.
Any ideas?
Here’s the code I’m working with (with my own failed contributions removed):
-- Convert URLs to PDF documents
-- Created by Christian Grunenberg on Mon Mar 23 2009.
-- Copyright (c) 2009. All rights reserved.
tell application id "com.devon-technologies.thinkpro2"
set theSelection to the selection
if theSelection is not {} then
try
set theGroup to display group selector
show progress indicator "Converting..." steps (count of theSelection)
repeat with theRecord in (the selection as list)
set theName to name of theRecord
set theURL to URL of theRecord
step progress indicator theName
if theURL begins with "http:" or theURL begins with "https:" then
create PDF document from theURL referrer theURL name theName in theGroup with pagination
end if
end repeat
hide progress indicator
on error error_message number error_number
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end if
end tell
Any guidance would be much appreciated!