• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting NoteBook
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting NoteBook


  • Subject: Scripting NoteBook
  • From: Rob Lewis <email@hidden>
  • Date: Mon, 11 Jan 2016 16:26:00 -0800

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


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Scripting NoteBook
      • From: email@hidden
  • Prev by Date: Re: UI scripting...
  • Next by Date: Scripting NoteBook, continued
  • Previous by thread: Re: Script Starter Templates
  • Next by thread: Re: Scripting NoteBook
  • Index(es):
    • Date
    • Thread