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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...