IanF 0 Posted February 22, 2019 Share Posted February 22, 2019 Hi, I want to use an apple script to send renamed pdfs into a specific folder within EN, using Hazel. Hazel has done the work renaming the file. The code I found which I think use to work is, but when I try and run this it fails. Can someone assist in correcting the error, OSAScript error: { OSAScriptErrorNumberKey = "-1708"}:- tell application "Evernote" activate create note from file theFile notebook {"notebook"} tags {"tag1", "tag 2", "tag 3", "tag 4"} end tell Many thanks. Link to comment
Level 5 Shane D. 1,818 Posted February 22, 2019 Level 5 Share Posted February 22, 2019 @DTLow Any insight you could provide here? Link to comment
IanF 0 Posted February 22, 2019 Author Share Posted February 22, 2019 Hi, Sorry, not sure what you are looking for. This is a script that I believe use to work to send a file, pdf from a folder into Evernote. Now it gives an error on theFile part of the statement. Link to comment
Level 5* DTLow 5,736 Posted February 22, 2019 Level 5* Share Posted February 22, 2019 1 hour ago, IanF said: Hi, I want to use an apple script to send renamed pdfs into a specific folder within EN, using Hazel. Hazel has done the work renaming the file. The code I found which I think use to work is, but when I try and run this it fails. Can someone assist in correcting the error, OSAScript error: { OSAScriptErrorNumberKey = "-1708"}:- This script worked for me set theFile to "/Users/david/Desktop/test.pdf" <----- Set a value for theFiletell application "Evernote" activate create note from file theFile notebook {"notebook"} tags {"tag1", "tag 2", "tag 3", "tag 4"}end tell Note: I had to identify a value for theFile Point of correction on terminology - This script creates a note, assigns notebook: notebook, tags:tag2, tag 2, tag 3, tag 4 There are no "specific folders" involved Which OS version are you running? Mojave is causing permission errors for scripts Link to comment
IanF 0 Posted February 22, 2019 Author Share Posted February 22, 2019 Thanks, I managed to fix it from within Hazel so it is all good now. Appreciate the info above, I'll use if for another instance. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.