As you may have heard, Circus Ponies has closed its doors, leaving users of its NoteBook app orphaned.
I’m trying to write a script to migrate my notebooks into some other app, probably TextEdit.
Can’t figure out why this handler can’t access the properties of a “cell”. Documents contain pages, which are made up of cells. However, cells can contain both cells and pages, and cells have a “text” property that is the meat of what I want to get at.
(for now, I am ignoring pages that may be contained by cells)
The log has error messages like this: get identifier of «class id 4.621785744E+9 of page id 4.61591776E+9 of notebook id 4.314097664E+9 --> error number -1700 from «class id 4.621785744E+9 of page id 4.61591776E+9 of notebook id 4.314097664E+9 to reference It appears the innermost “display dialog” can’t access the identifier property of the current cell. The statement works if I don’t try to append the identifier to the string.
--recursively handle a page, which contains (only) cells on handle_page(a_page) using terms from application "NoteBook" --display dialog "Entering handle_page for page " & name of a_page --works tell a_page try set nested_cells to its every cell --display dialog "Found " & (count of nested_cells) & " cells in page " & name of a_page --works repeat with a_nested_cell in nested_cells display dialog "About to recursively handle cell " & (identifier of a_nested_cell) --works without identifier tell me to handle_cell(a_nested_cell) --recurse end repeat end try end tell end using terms from end handle_page
|