|
Hi! Glad you could make it. no, really! Just copy and paste the HTML code into your new photoalbum page and the script below into the AppleScript Script Editor. It'll probably ask you where Outlook and BBEdit are and then you just gotta start customizing the script where the comments say to. Let me know if there's any problemos. |
HTML:
<!--
|
APPLESCRIPT:(* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (amazingly) by derek a. rosenstrauch for http://www.smilingisfun.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - When the Outlook Express app receives an attachment, this script moves the attachment to the special web folder and takes the filename and writes an image tag and appends it to the top of the list of images and captions it with the text of the subject header. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *) on run tell application "Outlook Express" set theMsg to item 1 of (get current messages) set mySub to subject of theMsg -- this will be the caption of my photo set imageName to name of every attachment of theMsg --this will go in the image tag below set file_path to ("hard drive:folder path:") & imageName -- define path to destination folder set my_att to (a reference to the attachment 1 of theMsg) -- get the attachment save my_att in (file_path) -- save the attachment end tell tell application "BBEdit 6.5" -- you may have to chanage this to reflect the version of BBEdit you use. activate open {file "hard drive:folder path:index.html"} with LF translation -- open my HTML file! -- the "put image here" serves as a target for the new image tag. we search-n-replace to insert the newly added file at the top of the page find "<!-- put image here -->" searching in text 1 of text window 1 options ¬ {search mode:literal, starting at top:true, wrap around:true, reverse:true, case sensitive:false, match words:false, extend selection:false} ¬ with selecting match -- this line is the image tag. images from the sidekick are 120x90 but you can change this or remove the width and height params if your image sizes will vary. set selection of window 1 to "<!-- put image here --> <img src=\"pics/" & imageName & "\" width=\"120\" height=\"90\" vspace=\"4\" border=\"2\" title=\"" & (current date) & "\"><br>" & mySub & "<hr size=\"1\" noshade color=\"#006600\">" -- end search-n-replace save text window 1 -- saves HTML file. if your mail-checking Mac is not the webserver, you will need to use BBEdit's "Save to FTP Server..." command. close text window 1 -- and closes it. end tell end run -- - - - - - - - - - - - - - - - BOO YAH! - - - - - - - - - - - - - - - - - - - - - - - - - |