MacCentre
Форум: Mac и Mac OS X
Тема: apple script notes to devothink pro

cala-nag [26.02.2019 12:46] apple script notes to devothink pro:
Добрый день товарищи. Задался интересной задачей, написать скрипт импоратция заметок из notes в devothink pro.

Накидал образец, но появляется ошибка. Скажите, что не так? как доработать. Заранее спасибо.

-- PREPARE THE LIST
set url_list to {}
set the date_stamp to ((the current date) as string)
set NoteTitle to "from notes on " & the date_stamp

--PROCESSING FRONTMOST CHROME WINDOW
tell application "Notes"
activate
set NotesWindow to the front window
set NoteCount to (count of (note of NotesWindow))
set successCount to 0

--GET TAB INFO
repeat with w in NoteWindow
try
repeat with t in (note of w)
set NoteName to (name of t)
set NoteID to (id of t)
set NoteContainer to (container of t)
set NoteBody to (body of t)
set NoteCreationDate to (creation date of t)
set NoteModificationDate to (modification date of t)
set NotePasswordProtected to (password protected of t)

--set Noteinfo to (" '' & NoteName& '' " & NoteID & "</a><br/>")
--ADD TO LIST
copy Noteinfo to the end of body_list

--INCREMENT SUCCESS COUNT
set successCount to (successCount + 1)
end repeat
end try
end repeat
end tell

-- CONVERT URL_LIST TO TEXT
set old_delim to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set body_list to url_list as text
set AppleScript's text item delimiters to old_delim

--MAKE THE ITEM IN DEVONthink Pro
tell application "DEVONthink Pro"

create record with {type:html, source:body_list, name:NoteTitle} in current group
end tell
zyx [26.02.2019 13:55] :
А какая ошибка?
cala-nag [26.02.2019 16:28] :
Вопрос решён. Спасибо.
[Тема закрыта модератором]