on «event EBlgoitm» of ev try set theTitle to («class titl» of ev) on error s set theTitle to "(No title)" end try try set theDesc to («class desc» of ev) on error s set theDesc to "" end try try set theSummary to («class summ» of ev) on error s set theSummary to "" end try try set theLink to («class link» of ev) on error s set theLink to "" end try try set thePermalink to («class plnk» of ev) on error s set thePermalink to "" end try try set theSubject to («class subj» of ev) on error s set theSubject to "" end try if (thePermalink is "") then set theBestLink to theLink else set theBestLink to thePermalink end if if (theBestLink is not "") then set theBestLink to "URL: " & theBestLink & return end if if (theSummary is "") then set theBody to theBestLink & theDesc else set theBody to theBestLink & theSummary end if tell application "iWeb" activate set theFolder to POSIX path of (the path to me) set theImagePath to theFolder & "Contents/Resources/Images/placeholder.png" set currDoc to item 1 of documents add photo blog entries currDoc with images {{|path|:theImagePath, desc:theTitle, body:theBody}} end tell quit end «event EBlgoitm»