The following script uses 2 images from a website, puts their URL into HTML and then creates a Notes file showing the two images. All working fine.
The same 2 images are also saved to my Mac and I want to create the exact same Notes file in the same way but using the saved images instead of the website URL.
This is part of a bigger problem that I am stuck with but can someone please help me with the format of the second example of LstImageURL to get it working.
Thanks.
-- ** Website picked at random for example purposes **
set LstImages to {}
-- Working
set LstImageURL to {"https://cccbr.org.uk/wp-content/uploads/2016/05/howdenMinsterBells.jpg", "https://cccbr.org.uk/wp-content/uploads/2016/10/whitechapel-handbells.jpg"}
-- Not Working
--set LstImageURL to {"Macintosh HD:Users:Myname:Images:howdenMinsterBells.jpg", "Macintosh HD:Users:Myname:Images:whitechapel-handbells.jpg"}
repeat with i from 1 to length of LstImageURL
set ImageURL to "<img src=\"" & item i of LstImageURL & "\"<p><p>"
copy ImageURL to the end of LstImages
end repeat
set ReportImages to items of LstImages
tell application "Notes"
set the noteBody to "<html>
<p><span style=\"color:#FF0000\">Pictures: </span>
<p>" & ReportImages & "
<p><span style=\"color:#FF0000\">End of Pictures: </span>
</html>"
set thisAccountName to "My name" -- For testing (images appear immediately in the note)
--set thisAccountName to "Icloud" -- (Sometimes a delay for the images to appear)
-- make a new note at the top application-level:
make new note at folder "Notes" of account thisAccountName with properties {body:noteBody}
end tell
noteBody