Script to change photo caption in iWeb to iPhoto comment text

Hi,
Does any body know, how I could automatic replace the caption of the photos I have imported from iPhoto with the Media Browser to iWeb with the comment text I have in iPhoto for every photo?
It should be just a script, which gets told the album and the looks for the file name which is in the caption, reads the comment for the photo in iPhoto and then puts replaces the caption with it in iWeb, then the next photo ...
I'm not good in scripting.;-(
Thanks and Regards,
JO

Ok, here my script, what I'm using now to copy the comment to the title in iPhoto before importing the photos to iWeb:
try
tell application "iPhoto"
activate
copy (my selected_images()) to these_images
if these_images is false then ¬
error "Please select the images."
display dialog "Copy comment to title for the selected photos?"
set the image_count to the count of these_images
display dialog "Processing " & (the image_count as string) & " photos." & return & return & "This will take a moment..." buttons {"•"} default button 1 giving up after 2
repeat with i from 1 to the image_count
set this_photo to item i of these_images
tell this_photo
set the title to the comment of this_photo
end tell
end repeat
end tell
on error error_message number error_number
tell application "iPhoto"
activate
if the error_number is not -128 then
display dialog error_message buttons {"OK"} default button 1
end if
end tell
end try
on selected_images()
tell application "iPhoto"
try
-- get selection
set these_items to the selection
-- check for single album selected
if the class of item 1 of these_items is album then error
-- return the list of selected photos
return these_items
on error
return false
end try
end tell
end selected_images

Similar Messages

  • Changing photo caption fonts

    I am using the template elegance with photos. I want to change the font of the image captions from italics to regular and change the color to black so the lettering shows up better. Can this be done globally, or do I have to change the captions one at a time?
    Thank you.

    oh jim! you are a perfectionist!
    here is a quote from sboben who makes templates at http://11mystics.com ! she says:
    Jean that's one of the things you can't change yet using the iWeb interface. There are a few of those elements on various pages like that. They can be changed in the template XML, but that's a very technical process that requires messing with core application files.
    so, if she finds it difficult jim, then is suggest you make text-boxes yourself! you could also try this link and fiddle with .css files:
    http://discussions.apple.com/message.jspa?messageID=1596652#1596652
    max

  • Photo captions in iWeb

    Greetings,
    I'm just creating my first site using iWeb but I am having trouble with photo captions. I am using a blank template and inserting photos into the text with a wrap round. that's fine. However, I can't work out how to put captions under the photos. I've tried using a text box but it won't drag up close to the photo,because  some of the handles remain white and the text on the page moves away from the box so it looks bad. . I've searched through help but can't find an answer there.
    If anyone has any thoughts I'd be grateful

    Your problem is that you cannot follow instructions even when they are spelled out.
    The instruction is not to DROP an image on the textbox, the instruction is to PASTE the image in the textbox.
    UPDATE:
    Here s a picture.
    1. A picture
    2. The picture in the textbox with a caption.
    3. The picture in the textbox with a caption inside a textbox with your text wrapped around it.

  • Cannot Change Photo Caption in Lightroom 2.3

    I am not able to get Lightroom 2.3 to change the caption of photos taken with a Sony A100.  The caption reads "Sony DSC."  All of my efforts to change this caption to something else have failed, including use of the "Save Metadata to File" command.  While the program initially reflects a change or deletion in the caption at first, when I navigate away from the photo and then return, it always reverts to "Sony DSC."  If someone can suggest a different approach or a workaround it would be much appreciated.  Note that this does not seem to be a problem with Photoshop Elements 6.  I have not yet tried to see if I can make this change in Bridge yet. Thanks.

    I have given up trying to find a solution in LR.  It stubbornly overwrites "Sony DSC" on every photo I import and wipes out all changes I try to make in the caption field. I have not found a direct fix in LR, causing me nothing but frustration. But I have found a workaround which sounds complicated but is really quite simple.  The key is to import via the import utility in PS Bridge rather than with the LR import dialogue.  You wipe out the description field which contains "Sony DSC" in Bridge.  Then you synchronize the folder in LR.  Problem solved.  Here are the steps for Windows users.
    Step 1:  Create a Custom Template in Bridge.  (a) Go to Tools - Create Metadata Template; (b) In the "Create Metadata Template" dialogue box: (1) under the "IPTC (IIM, legacy)" tab, place a check in the box next to "Description" and leave the field to the right blank (make sure no other boxes are checked); (2) under the "IPTC Core" tab, place a check in the box next to "Description" and leave the field to the right blank; (c) In the "Template Name" field replace "Untitled" with "Clear Sony DSC" (or whatever you want to call your template).
    Step 2: Import your photos with the import tool in Bridge (the key is not to import with LR).
    Step 3: (a) navigate to the newly imported file of images; (b) in Metadata view click on the top image in the folder and shift click on the last image in the folder to select all; (c) right click on one of the selected images and click on "File info . . .; (d) In the dialogue box that appears, click on the down arrow next to the "Import" button; (e) one of the options should be "Clear Sony DSC" (or whatever you named your template), click on that: (f) an "Import Options" dialogue box will appear, with three choices.  Choose the first of the three "Clear existing properties and replace with template properties."  (Note this will only overwrite "Sony DSC" in the description fields of the metadata and leave those fields blank and will not overwrite any other metadata.); (g) That will return you to the File Information dialogue box. Click the "OK" button at the bottom.  Bridge will now take some time overwriting the description fields in the metadata attached to your images.
    Step 4:  Go to LR.  In the Develop module navigate to the folder in which this new folder of images was placed by Bridge.  In the top menu go to Library - Synchronize Folders. Lightroom will now capture this folder of images in your LR catalogue and the attached metadata but thankfully not the troublesome "Sony DSC", so you should be free to edit the caption field in LR.  Do not use "Import Photos from Disk at this seems to recreate the problem and results in duplicate images.
    Let me know if this works for you. 

  • Photo Captions in iWeb '08

    Hi I am new to iWeb, having just purchased a new iMac with iLife '08 installed. I had been using a shareware program called "Better HTML Export" with iPhoto '04 to quickly create photo albums for my website,which worked well, but I have been looking forward to using iWeb which promises to be even easier.
    My question is this: is there a way to use the "description" field in iPhoto as the caption for a photo in iWeb? Better HTML Export has a feature where the image title is displayed beneath the thumbnail for an image, but the description field text is displayed beneath the full-size picture. Can I do this in iWeb?

    I had the same question, and cutting and pasting would be too laborious for my purpose.
    In essence, I am accumulating hundreds of photos that have names, keywords, and descriptions. I can create a smart album (perhaps due to a customer query) using these words within iPhoto and then publish that smart album to iWeb. If a particular smart album has 50 photos, I wouldn't want to cut and paste the description field in iPhoto to the name of the photos in iWeb.
    I would imagine it would be easy to add the ratings, keywords, description field, or other photo properties to be displayed in iWeb automatically - but wouldn't be surprised if it doesn't.

  • Published photos and captions do not match photos (correct on iWeb)

    I recently added more pictures on a couple of photopages and place in a certain order. It displaced all the photos and the captions accordingly. After Publishing the captions did not match the photos and seemed to stay in the places where they were previously published. I tried to retype each caption that was incorrect then saved then republish, however some were corrected but most were not. If you click on a incorrect picture and see the full pic, it opens with the correct caption/name on the window. I also added some new captions to certain photos without captions or changed some captions and some show and some do not. Anyone have any ideas. Thank you.
    http://web.mac.com/urbz112
    ju
    Powerbook G4   Mac OS X (10.4.6)  

    Welcome to the discussion Ju
    The first thing that springs to mind is caching, if you are using Safari:
    go to Safari > Empty Cache..
    Then try the page again, you can also put a ? at the end of the address and refresh the page. Sometimes its a combination of both that fixes it, and sometimes it seems that the .mac servers cache everything and dont serve up the fully refreshed pages!
    Will
    1GHz G4, 15" PowerBook, Airport Network, 1G iPod Mini   Mac OS X (10.4.6)   www.willg4pb.com for iWeb tips

  • IWeb photo captions published via ftp?

    I'm new to iWeb - are photo captions published via ftp now that MobileMe is defunct?  The info in Publish Site says no.  As I wish to use photos purchased and downloaded from a stock agency, they must be captioned with the photographer's name.  I can work around this by acknowledging the photographers in a list above the Album I've created rather than under each photo (if this proves to be acceptable to the stock agency), but this isn't ideal.  Thanks for any advise you can offer.

    Captions added to the images inside a photos template are published no matter where you publish your website.
    The number of caption lines is chosen in the photo Grid popup window...

  • IWeb Photo Captioning from Aperture Metadata

    I'm not sure if this should be under iWeb or Aperture. I use Aperture 2.1 and iWeb '08 2.0.3. In iWeb I have albums of photos from Aperture. When using the media browser for adding Aperture photos into iWeb, the standard nomenclature is for the iWeb caption to use the Aperture 'Version Name'. Since iWeb can be set to have more than one caption line, I was wondering if there was a way to map Aperture metadata into the multiple lines of iWeb photo captions? As it is, any additional iWeb caption lines have to be added manually. Can this additional caption information be added automatically?

    I'm banging my head on this too.. I prefer to use iWeb for several reasons: one is that I publish to a non-Apple webhost; and I prefer the editing capabilities of iWeb vs Aperture/iPhoto -- plus the templates are more varied.
    It's hard to believe that Apple doesn't provide this extremely basic capability. I've noticed other threads on this & it doesn't seem that it's possible.
    Randy

  • Still cannot change radio caption color by script

    Hello,
    I've been trying to follow advice seen in other threads when developers wanted to inactivate radio button choices by script, and also turn the caption grey. What I'm finding is I can deactivate the choice but I just cannot turn the caption grey.
    If the exclusion group is named "MyRadioChoice" and the choices are (say) "Choice1", "Choice2", "Choice3" and due to other user input Choice3 becomes inapplicable, then the wisdom is this should work:
    MyRadioChoice.Choice3.access = "readOnly";
    MyRadioChoice.Choice3.caption.font.fill.color = "192,192,192";
    The first statement works, the choice can no longer be clicked. But the second does not work, I just can't change the caption color. THe script does not throw any errors, it just plain doesn't work. Can anybody help?

    You were right. That problem was driving me crazy. Thank you for the solution.

  • Globally changing selected parts of photo captions

    Is there a way to make batch changes to parts of photo captions? Something like "find and change" in word processing software.
    For instance, I accidentally had the time setting wrong on my camera so that AM was PM and vice versa. I would like to change the AM to PM without affecting the actual time associated with images. This will be very tedious if I have to do it manually...

    Hi Dave,
    Oh, so you have been appending the batch change entries -that explains it.
    The "Title" field can be batch changed like any other field, only you have to find and to select a suitable Metadata Preset that contains the "Title" field.
    I have changed my presets so often, that I am no longer sure, if one of the standard presets contains this field, but you can easily define your own preset, containing all fields you want to edit.
    In the Metadata tab of the Inspector Panel set the "Metadata View" selector to "Edit",
    In the "Metadata Views" panel click the cogwheel to add a new view and name it,
    From the right column of the panel add the "Title" tag to the  new View (this tag is located in the IPTC -> Status section of the Metadata Fields.
    Then use this new preset in the "Batch Change" dialogue.
    Regards
    Léonie
    Message was edited by: leonieDF added picture, edited typos

  • Changing Photo Name

    I find it hard to believe there is no way to change the name of a photo once it is imported into iWeb. But so far, I cannot find a way. I do not see this as a problem on the web page itself, but if someone downloads the photo, they'll get the original name. A few of which are embarrassing.
    How can I change the photo name besides starting all over?

    Yes,
    You need to run the script right after each time you publish to folder.
    The script will look for photo page(s) in the published folder and apply photo captions to the published photo file names, and re-link the new photo names in the .js file (this is for the slideshow).
    There is one thing though, I wrote the script to pad out any spaces in the captions with underscore.
    Example: caption: "Twisted tree 1" , the script will name the file to "Twistedtree1.jpg" . The reason is that many FTP servers don't like spaces in file name.
    You can get there script here: iWeb Photos Rename
    I will post in another thread for this fix.

  • Aperture Captions to iWeb

    I want to use iWeb to create a photo page. When I import photos from an Aperture Album (via Media Browser), the iWeb captions are the file name (version name) and not the captions created in Aperture.
    Is there a way to get the Aperture Caption to show as the Caption in iWeb?
    I've seen some discussion of this, but it's unclear if anyone has solved this. Seems like a no brainer; well it should happen by default--a caption is a caption. This isn't 1984. But I'm probably missing something simple.
    Message was edited by: MtnBiker

    Getting the captions from iPhoto is the same problem. But there has been an Applescript created for iPhoto that copies the Comments to the Title field for importing to iWeb and then the title can be changed back to the file name using iPhoto.
    You might be able to edit the script to have it work with Aperture. You can get it from this Mac OS X Hints post: Descriptions to Title in iPhoto

  • Adding dates to Photo captions

    Anyone know if it is possible to automatically include the capture date with the file name in the caption for Photos? (I'm using iPhoto)

    You could try this.
    In iPhoto, highlight a photo (test this first!) then go to > Photos > Batch Change...
    Set "Title" to "Date/Time"
    Then go to File > Export..
    Set in Filename tab, Name, "Use Title"
    Then export the test picture, either using the export option above, or clicking on the iWeb icon and see what happens.
    Will

  • How to move the Thumbnails & the photo caption to top in Galleria

    I am working on a click-able gallery using the coding found on jQuery Galleria 1.0b from
    http://galleria.aino.se/
    Similar coding can be found on here;
    http://monc.se/kitchen/146/galleria-a-javascript-image-gallery#comments
    I would like to move the thumbnails and the photo captions to the top, rather than having it at the bottom. Much apperciated any help. I cannot read coding as i am new to these things. My HTML coding as follows;
    <link href="test/galleria.css" rel="stylesheet" type="text/css" media="screen">
        <script type="text/javascript" src="test/jquery.min.js"></script>
        <script type="text/javascript" src="test/jquery.galleria.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){
            $('.gallery_demo_unstyled').addClass('gallery_demo'); // adds new class name to maintain degradability
            $('ul.gallery_demo').galleria({
                history   : true, // activates the history object for bookmarking, back-button etc.
                clickNext : true, // helper for making the image clickable
                insert    : '#main_image', // the containing selector for our main image
                onImage   : function(image,caption,thumb) { // let's add some image effects for demonstration purposes
                    // fade in the image & caption
                    image.css('display','none').fadeIn(1000);
                    caption.css('display','none').fadeIn(1000);
                    // fetch the thumbnail container
                    var _li = thumb.parents('li');
                    // fade out inactive thumbnail
                    _li.siblings().children('img.selected').fadeTo(500,0.3);
                    // fade in active thumbnail
                    thumb.fadeTo('fast',1).addClass('selected');
                    // add a title for the clickable image
                    image.attr('title','Next image >>');
                onThumb : function(thumb) { // thumbnail effects goes here
                    // fetch the thumbnail container
                    var _li = thumb.parents('li');
                    // if thumbnail is active, fade all the way.
                    var _fadeTo = _li.is('.active') ? '1' : '0.3';
                    // fade in the thumbnail when finnished loading
                    thumb.css({display:'none',opacity:_fadeTo}).fadeIn(1500);
                    // hover effects
                    thumb.hover(
                        function() { thumb.fadeTo('fast',1); },
                        function() { _li.not('.active').children('img').fadeTo('fast',0.3); } // don't fade out if the parent is active
        </script>
        <style media="screen,projection" type="text/css">
        /* BEGIN DEMO STYLE */
        *{margin:0;padding:0}
        body{padding:20px;background:white;text-align:center;background:black;color:#bba;font:80% /140% georgia,serif;}
        h1,h2{font:bold 80% 'helvetica neue',sans-serif;letter-spacing:3px;text-transform:uppercase;}
        a{color:#348;text-decoration:none;outline:none;}
        a:hover{color:#67a;}
        .caption{font-style:italic;color:#887;}
        .demo{position:relative;margin-top:2em;}
        .gallery_demo{width:702px;margin:0 auto;}
        .gallery_demo li{width:68px;height:50px;border:3px double #111;margin: 0 2px;background:#000;}
        .gallery_demo li div{left:240px}
        .gallery_demo li div .caption{font:italic 0.7em/1.4 georgia,serif;}
        #main_image{margin:0 auto 60px auto;height:438px;width:700px;background:black;}
        #main_image img{margin-bottom:10px;}
        .nav{padding-top:15px;clear:both;font:80% 'helvetica neue',sans-serif;letter-spacing:3px;text-transform:uppercase;}
        .info{text-align:left;width:700px;margin:30px auto;border-top:1px dotted #221;padding-top:30px;}
        .info p{margin-top:1.6em;}
        </style>
    </head>
    <body>
    <h1>Galleria Demo 01</h1>
    <div class="demo">
    <div id="main_image"></div>
    <ul class="gallery_demo_unstyled">
        <li><img src="test/img/flowing-rock.jpg" alt="Flowing Rock" title="Flowing Rock Caption"></li>
        <li><img src="test/img/stones.jpg" alt="Stones" title="Stones - from Apple images"></li>
        <li class="active"><img src="test/img/grass-blades.jpg" alt="Grass Blades" title="Apple nature desktop images"></li>
        <li><img src="test/img/ladybug.jpg" alt="Ladybug" title="Ut rutrum, lectus eu pulvinar elementum, lacus urna vestibulum ipsum"></li>
        <li><img src="test/img/lightning.jpg" alt="Lightning" title="Black &amp; White"></li>
        <li><img src="test/img/lotus.jpg" alt="Lotus" title="Fusce quam mi, sagittis nec, adipiscing at, sodales quis"></li>
        <li><img src="test/img/mojave.jpg" alt="Mojave" title="Suspendisse volutpat posuere dui. Suspendisse sit amet lorem et risus faucibus pellentesque."></li>
        <li><img src="test/img/pier.jpg" alt="Pier" title="Proin erat nisi"></li>
        <li><img src="test/img/sea-mist.jpg" alt="Sea Mist" title="Caption text from title"></li>
    </ul>
    <p class="nav"><a href="#" onclick="$.galleria.prev(); return false;">&laquo; previous</a> | <a href="#" onclick="$.galleria.next(); return false;">next &raquo;</a></p>
    </div>
    The CSS coding as follows;
    .galleria{list-style:none;width:200px}
    .galleria li{display:block;width:80px;height:80px;overflow:hidden;float:left;margin:0 10px 10px 0}
    .galleria li a{display:none}
    .galleria li div{position:absolute;display:none;top:0;left:180px}
    .galleria li div img{cursor:pointer}
    .galleria li.active div img,.galleria li.active div{display:block}
    .galleria li img.thumb{cursor:pointer;top:auto;left:auto;display:block;width:auto;height:auto}
    .galleria li .caption{display:block;padding-top:.5em}
    .galleria_main div{display:none;}
    .galleria_main div.active{display:block;}
    * html .galleria li div span{width:400px} /* MSIE bug */

    Looks like you are talking about taskbar, See:
    * http://www.sevenforums.com/tutorials/1066-taskbar-move-location-desktop-screen.html

  • Changed Photo file names won't update

    Hi, I am having a problem that I need help with. In my iWeb photo gallery page I have some photos that had filenames that were too long (for my server) and I had to change. I shortened them in iPhoto and replaced them in the iWeb gallery page. (I quit and restatrted programs appropriately). Still when I republish the page, the OLD photo filenales are showing in the photo gallery folder!! I have redone this proceedure 4 times now and am at wits end!!

    WOW! What a pain! I changed all the file names in the iPhoto Library and it still did not work. So I opened each of the photos using JVeiw and saved them to the Desktop. The replaced the filed in iPhoto with the new ones. Then replaced the files in iWeb. finally, it worked. I was able to publish to folder. Now when I upload to my server, I get the message about other file names being too long. The files are in the 'comments' folder of the published folder. Mine are B80F49F8-5F59-4C79-B827-1DC21D1729BE_files.
    I can not upload these to my old Appleshare IP 9.2 server.

Maybe you are looking for

  • How can I check purchases on an itunes gift card?

    I wanna look at what purchases are made on an itunes card. They were made on my account if that helps. Can anyone tell me how to do this?

  • How to deactivate Adobe Acrobat v7?

    I have Adobe Acrobat Version 7 installed. I would like to move up the Version 9 to use the new features; mass file size reduction and web forms. I want to move the Version 7 installed on my PC by deactivating it -then installed it on some-else's PC a

  • Custom field data is lost or not available after any action

    I added a custom field on ERP_H component and I made this field available through getter methods. I brought this field in to header view and the field looks ok but after I enter the data in that field, the value enter doesn't get retained. I saw the

  • What is the best way to read, process, and write an Excel File Server side...SQL Server Agent Job

    So I was using dynamic Excel commands to open and save as using... Microsoft.Office.Interop.Excel.Application and  workbook.SaveAs(StringDestinationFile, XlFileFormat.xlExcel8, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMod

  • Resource bundle not found

    Hi, I would like to know where to put resource bundle file (it is, something.properties) to be seen in portal channel and background classes more info and workabout in my class I use resource bundle class Messages which loads resources from bundle "b