wlmorin 0 Posted June 15, 2013 Share Posted June 15, 2013 I currently have a simple embedded AppleScript in Hazel to move a select PDF file to a new Evernote note (below). How would I go about adding the file to a specific notebook? Currently the new note is sent my default folder "@Inbox". tell application "Evernote"activatecreate note from file theFileend tell Thanks in advance Link to comment
Level 5* chirmer 567 Posted June 16, 2013 Level 5* Share Posted June 16, 2013 Change your script to:tell application "Evernote"activatecreate note from file theFile notebook "Notebook Name"end tell Link to comment
rfbriggs 1 Posted September 12, 2013 Share Posted September 12, 2013 Hello. I tried the simplest form of this script in Hazel (the one that goes to the default notebook), and it wouldn't compile. Attached is what I got. Any ideas? I am on the latest version of Mountain Lion, Hazel, Evernote. Thanks! Link to comment
palobo 0 Posted September 26, 2013 Share Posted September 26, 2013 Hi, Evernote needs to be open at the time you create and compile the rule and applescript. Link to comment
Lew 0 Posted November 27, 2013 Share Posted November 27, 2013 I've been using this script for quite some time with no issues: tell application "Evernote" activate create note from file theFile notebook {"Notebook_Name"} tags {"Tag_Name"}end tell Lew Link to comment
palobo 0 Posted November 27, 2013 Share Posted November 27, 2013 Hello. I tried the simplest form of this script in Hazel (the one that goes to the default notebook), and it wouldn't compile. Attached is what I got. Any ideas? I am on the latest version of Mountain Lion, Hazel, Evernote. Thanks!Hi, Not sure if you managed to sort out your issue, but another way around this is to change tell application "Evernote" to tell application id "com.evernote.evernote". That should fix it. Link to comment
wlmorin 0 Posted November 28, 2013 Author Share Posted November 28, 2013 Lew How do you add multiple tags to your script? Should the all be listed between " " with spaces or commas? Link to comment
Lew 0 Posted December 2, 2013 Share Posted December 2, 2013 Lew How do you add multiple tags to your script? Should the all be listed between " " with spaces or commas? I would use the following script for multiple tags: tell application "Evernote" activate create note from file theFile notebook {"Notebook_Name"} tags {"Tag_Name1”, "Tag_Name2”, "Tag_Name3”, "Tag_Name4”}end tell Lew Link to comment
gaoruijie 0 Posted December 9, 2013 Share Posted December 9, 2013 My setting does not work Link to comment
vloryan 0 Posted August 8, 2014 Share Posted August 8, 2014 Can somebody please tell me how to set a reminder within this code heretell application "Evernote"activatecreate note from file theFile notebook "Notebook Name"end tellI need a reminder for "two days from today". Thank you very much! Link to comment
chowmein 0 Posted September 4, 2014 Share Posted September 4, 2014 Hi everyone, I am brand new to this forum and had a question regarding creating a Hazel rule that would send the file to Evernote and add it to a specific NOTEBOOK Stack. I found this specific question on the Noodlesofts forum but without any answers. "- How do you specify a notebook stack in Evernote and the Syntax to specify a specific notebook within the the notebook stack?" http://www.noodlesoft.com/forums/viewtopic.php?f=4&t=3449 I currently use the following applescript within hazel to send it to the general NOTEBOOK with tags and this works fine. Would love to know how to edit this script so that it will be sent to a specific NOTEBOOK STACK. tell application "Evernote"activatecreate note from file theFile notebook {"Notebook Name"} tags {"tag1", "tag 2", "tag 3", "tag 4"}end tell Link to comment
Level 5 Adjusting 276 Posted September 4, 2014 Level 5 Share Posted September 4, 2014 Stacks cannot contain notes, they can only contain notebooks.What you probably want to do is add the note to a specific notebook within the stack.The script you have should be able to handle that already. Link to comment
chowmein 0 Posted September 4, 2014 Share Posted September 4, 2014 thank you. I just tested and it will add the note to the specific notebook within the stack. Link to comment
Popp Sound 1 Posted December 8, 2014 Share Posted December 8, 2014 Does anyone have an idea on how to append the title of the note? I want to have it say something like "Checking Account Statement: " and then place the title of the file. Thanks in advance! Link to comment
dgold105 1 Posted May 28, 2015 Share Posted May 28, 2015 I've been using a Hazel evernote script for a long time now. Suddenly last week I noticed it is no longer adding tags to documents it's adding to Evernote. It is putting them in the right folder but not assigning tags even though they are correct. Any idea what has caused this to stop happening. The script I'm using is of the form: tell application "Evernote" activate create note from file theFile notebook {"Notebook Name"} tags {"tag1", "tag 2", "tag 3", "tag 4"}end tell Link to comment
happy_martin 0 Posted June 14, 2015 Share Posted June 14, 2015 Hope this helps... 1) You can remove 'activate' from the script. If you do it will run the script in the background without grabbing Evernote's focus every time it runs.2) dgold - I also had issues adding tags until I manually created the tags in evernote first. After that the tagging worked perfectly. Link to comment
chowmein 0 Posted June 24, 2015 Share Posted June 24, 2015 @dgold105 - I've experienced the symptoms of 'empty' tags recently but the note does go to the correct folders set in script. I'm not exactly sure what the cause maybe but have observed it on more than a handful of occasions recently. I just wanted to chime in and report that I'm a witness to this occurrence. I'll continue to monitor it and update forum as necessary. Link to comment
dgold105 1 Posted June 24, 2015 Share Posted June 24, 2015 @chowmein there is a fix in this discussion: https://discussion.evernote.com/topic/85315-applescript-not-assigning-tags-help/ It's a problem with the current version of Evernote. Link to comment
chowmein 0 Posted June 24, 2015 Share Posted June 24, 2015 okay, awesome thank you for the update on the discussion. Link to comment
McGilligan 0 Posted March 26, 2016 Share Posted March 26, 2016 My goal - use Hazel to move pdf to amex notebook in EN. I am getting an error when copy and pasting these exact scripts. Screen shots attached. Error reads: The variable theFile is not defined. EN is open. Notebook matches EN exactly. Any help is appreciated! Link to comment
Level 5* DTLow 5,736 Posted March 26, 2016 Level 5* Share Posted March 26, 2016 53 minutes ago, McGilligan said: My goal - use Hazel to move pdf to amex notebook in EN. I am getting an error when copy and pasting these exact scripts. Screen shots attached. Error reads: The variable theFile is not defined. EN is open. Notebook matches EN exactly. Any help is appreciated! Is this display from executing Hazel or from executing Script Editor? In Hazel, variable theFile is defined by Hazel and the filename is passed to the script. If you're running outside of Hazel, you need to define the variable. For example, set theFile to xxx Instead of Hazel, I use the built in Folder Actions. My script looks like this on adding folder items to this_folder after receiving new_Files delay 5 repeat with i from 1 to number of items in new_Files set new_File to item i of new_Files Process_File(new_File) end repeatend adding folder items to Link to comment
McGilligan 0 Posted March 26, 2016 Share Posted March 26, 2016 @DTLow ah. It's executing from script editor which I have referenced in Hazel. After embedding the script in Hazel it works as expected. which is better to run inside or outside of Hazel? Link to comment
Level 5* DTLow 5,736 Posted March 26, 2016 Level 5* Share Posted March 26, 2016 1 minute ago, McGilligan said: @DTLow ah. It's executing from script editor which I have referenced in Hazel. After embedding the script in Hazel it works as expected. which is better to run inside or outside of Hazel? If you run outside of Hazel, you have to supply the filename Example: Set theFile to xxxxxxxxxxxxxxx Link to comment
McGilligan 0 Posted March 26, 2016 Share Posted March 26, 2016 @DTLow ok - so unless the file name will be the same I need to run inside Hazel. I have Hazel renaming the file name with current date on the front end. Link to comment
Level 5* DTLow 5,736 Posted March 26, 2016 Level 5* Share Posted March 26, 2016 9 minutes ago, McGilligan said: @DTLow ok - so unless the file name will be the same I need to run inside Hazel. I have Hazel renaming the file name with current date on the front end. For me, it's Folder Actions Applescript can be coded to rename or delete files For example: tell application "Finder" to delete new_File set the name of file "Monterey" to "Eden" Link to comment
daniel1144 0 Posted August 9, 2017 Share Posted August 9, 2017 On 3/26/2016 at 1:09 PM, McGilligan said: @DTLow ah. It's executing from script editor which I have referenced in Hazel. After embedding the script in Hazel it works as expected. which is better to run inside or outside of Hazel? I am trying to do a similar thing, i.e. have PDF files gathered in Zotero, saved in a dropbox folder, and sent to a notebook in EN. How and what exactly did you embed into the Hazel script? I have selected Run Shell Script and entered the code referenced above, but it will not work. I have tried running it through AppleScript, but experienced the same problem regarding theFile being "undefined." I changed the file name in AppleScript to correspond with the folder, but I only get a .zip of the file itself placed into the EN notebook. I basically want PDF files to be sent to EN each time a new one is downloaded and saved to the folder. Link to comment
arantesvl 3 Posted December 5, 2018 Share Posted December 5, 2018 Hello! Does anyone know if it would be possible to add an Evernote tag via hazel (script) depending on the month and year? Have have a nested time related tag structure and it would be nice to add those automatically. For example: If pdf file is being imported today it would tag it with 12-Dec and [2018]. How do I automate this tagging process during file intake. via hazel? I hope I was able to explain the idea, if not, please let me know and I will try to come up with a better example. Thank you all in advance! -V Link to comment
Level 5* DTLow 5,736 Posted December 5, 2018 Level 5* Share Posted December 5, 2018 48 minutes ago, arantesvl said: Hello! Does anyone know if it would be possible to add an Evernote tag via hazel (script) depending on the month and year? Have have a nested time related tag structure and it would be nice to add those automatically. For example: If pdf file is being imported today it would tag it with 12-Dec and [2018]. How do I automate this tagging process during file intake. via hazel? I'm not a Hazel user, but I understand Hazel Scripts are AppleScript. Sample code is assign tag theDate to theNote and you would assign theDate to whatever value you chose Evernote Applescript is documented at https://dev.evernote.com/doc/articles/applescript.php Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.