Jump to content
IanF

Apple script assistance please

Recommended Posts

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.

 

Share this post


Link to post

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.

 

 

 

Share this post


Link to post
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 theFile
tell 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

Share this post


Link to post

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.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...