Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

EN 5.0.5 AppleScript syntax for checkboxes

applescript api local api

  • Please log in to reply
10 replies to this topic

#1 iNik

iNik

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 76 posts

Posted 25 January 2013 - 04:36 PM

The release notes for EN 5.0.5 say that AppleScript can now create checkboxes in ENML. I do not see any additions in the documentation explaining the syntax, nor can I create checkboxes. What is the appropriate syntax to create a checkbox?

Thanks!

#2 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 408 posts

Posted 25 January 2013 - 11:28 PM

You can create checkboxes by adding EN-TODO tags when importing a file for a note using the following syntax:

create note title "Note 4" from file "/path/to/a/file.txt" notebook notebook1


#3 RobLewis

RobLewis

  • PipPipPipPip
  • Title: Shepherd
  • Group: Members
  • 178 posts

Posted 28 January 2013 - 12:00 AM

I'm sorry, Julien, but I don't understand your answer. Are you saying the only way to create checkboxes is by creating a new note from a text file that already contains the markup for them?

This seems of very limited usefulness to me. Can you perhaps elaborate?

#4 iNik

iNik

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 76 posts

Posted 28 January 2013 - 03:35 PM

Agreed. This really needs to work for note creation, appending and editing in text and html mode.

#5 iNik

iNik

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 76 posts

Posted 28 January 2013 - 04:48 PM

Julien, the syntax you gave doesn't seem to work with a text file. The only syntax that did work for me was:

create note with enml "<en-todo/> Foo"

Since ENML is about the same as HTML, this works all right for creating notes. (Provided I remember to put some paragraph tags in for new lines -- it would be nice to have a "create line breaks" option on import/append of HTML and ENML.)

Still, without editable ENML content and the ability to append, this is a very limited solution. I'm still pretty much stuck with the work-around of exporting the note to a temporary ENML file, editing the ENML as text, deleting the original note, and finally importing the edited ENML file. Inelegant to say the least.

My dream would be to access checkboxes as objects of the note, as with attachments. Something like:

get todos of note x

and

check todo 1 of note x

and

append todo to note x with text "here is a new todo item"

One necessity here would be to have a "text" property of Todos that contains any text/markup on the same line as the todo -- otherwise they'd be pretty useless as objects.

#6 Mustafa

Mustafa

  • Title: Browncoat
  • Group: Evernote Employee
  • 348 posts

Posted 29 January 2013 - 12:58 AM

Did you try using the "append" command?

append note : The note to modify.
[text text] : Text to append.
[html text] : HTML to append.
[attachment file] : Attachment file to append.

#7 iNik

iNik

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 76 posts

Posted 29 January 2013 - 02:15 AM

It only seems to work with ENML, which cannot be appended.

#8 Mustafa

Mustafa

  • Title: Browncoat
  • Group: Evernote Employee
  • 348 posts

Posted 29 January 2013 - 02:29 AM

You can append HTML/text to the existing ENML. However, it is not possible to append checkboxes at this time. We will add this feature soon.

#9 Palladion

Palladion

  • Pip
  • Title: Member
  • Group: Members
  • 30 posts

Posted 26 February 2013 - 09:34 PM

Mustafa,

 

how do I append HTML/text to an existing ENML?



#10 Mustafa

Mustafa

  • Title: Browncoat
  • Group: Evernote Employee
  • 348 posts

Posted 26 February 2013 - 09:43 PM

Hi,

 

You can use this API to append :

 

 

append note : The note to modify.


[text text] : Text to append.


[html text] : HTML to append.


[attachment file] : Attachment file to append.

 

Thanks,

Mustafa



#11 Palladion

Palladion

  • Pip
  • Title: Member
  • Group: Members
  • 30 posts

Posted 26 February 2013 - 09:55 PM

Thanks - I've overseen this one.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote