Jump to content

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.

 

Link to comment
  • Level 5*
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

Link to comment

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...