//Create Evernote App SBApplication
EvernoteApplication *evernoteApp = [SBApplication applicationWithBundleIdentifier:@"com.evernote.Evernote"];
evernoteApp.delegate = self;
//Take this ENML Code
NSString *enml = @"<div>This is an encrypted text for OneNote Saferoom.</div><div><br/></div><div>PDF file</div><div><en-media type=\"application/pdf\" style=\"cursor:pointer;\" height=\"43\" hash=\"fa7d7e650b2cec68f302b31ba28235d8\"/></div><div><br/></div><div>Image</div><div><en-media style=\"height: auto;\" type=\"image/png\" hash=\"64957a2bd851f625383a5b9e410965d7\"/></div>";
//Create correct Array of URLS for above (Set the URLs before)
NSArray *resourceURLs = [NSArray arrayWithObjects:url2,url1,nil];
//Upload the note to Evernote
[evernoteApp createNoteFromFile:nil fromUrl:nil withText:nil withHtml:nil withEnml:[NSString stringWithFormat:@"<en-note>%@</en-note>",enml] title:noteTitle notebook:workingNotebook tags:tags attachments:resourceURLs created:nil];
现在我得到了带有额外重复资源的注释(Evernote app只是将resourceURLs数组中的所有资源添加到注释的末尾):
我开始相信Evernote.app如何处理createNote请求有一个错误。
我们将不胜感激。
更新1: 使用纯AppleScript进行测试时,仍然会重复资源: https://www.dropbox.com/s/rvpc4est8ef7q4c/EvernoteAppleScript_bug.scpt?dl=0
谢谢, 髂骨