Slideshow from selected images in folder - LR3 creates previews of all images

I select a number of images in a folder in the Library module and go to the Slideshow module. When I run the slideshow LR3 generates previews of all of the images in the relevant folder - rather than merely those for the images I have selected.
I'm running LR3.2RC in Win 7 64 bit. The same happened with LR3 itself. My recollection (which may be faulty) was that this worked as I would have expected in LR2 (in other words, previews were generated only for the selected images in the folder).
(I know I could add the selected images to a collection but I don't always necessarily wish to do that.)
Stephen

Hi Stephen
In Slideshow module, on the toolbar you can click on the dropdown options against Use:
Make sure you check selected items and not all filmstrip items.
If you can’t see the toolbar above the filmstrip press T and T again to hide it.

Similar Messages

  • Creating a Book from selected images in Aperture browser creates empty book

    I have been a happy user of Aperture 2 for several weeks now but I have been stumped by a problem when I come to layout a book. Help please!
    The problem is that any book I create contains no pictures in the aperture browser - so I can't add anything to my empty books. I have tried everything to get images into my book but nothing works. What is odd is that Projects tab I see that the total number of photos I selected at book creation time is given correctly. I just can't see any in the browser.
    I have also tried to drag and drop pictures into the book pages and the project folder but nothing happens.
    Any help is much appreciated.
    Steve

    Hi Thomas,
    Thanks so much for replying.
    In answer to your question - the bottom bar of the browser does not say anything - and yet the Projects tab lists the book and also the number of images that I selected when I made the New -- Book from the pull down menu option.
    I also tried to add images to the book's browser by drag and drop from another project or folder to the name of the book project in the project list. It doesn't work for me.
    Very odd as I have been happily importing, exporting and publishing web galleries for several weeks now.
    FYI, my Aperture library is about 100 Gb in size with 7,700 photos. I run OS X 10.5.3 on my Intel MacBook Pro 17 inch with 6TB of firewire connected disks.
    Any help or ideas are very much appreciated.

  • Create thumbnail from selected images

    Hi,
    in my app the user can choose some pictures from his local
    file system.
    I want to create a smaller image of every selected picture.
    So I do this for each image:
    for( var f = 0; f < e.files.length; f++ ){
    name = e.files[f].name;
    src = e.files[f].url;
    path = e.files[f].parent.url;
    files.push( e.files[f] );
    //...some other code, not important for this...//
    image = new air.Loader();
    image.contentLoaderInfo.addEventListener(
    air.Event.COMPLETE, function() {
    var ratio = null;
    if (image.width <= 100) {
    thumb_height = image.height;
    thumb_width = image.width;
    ratio = 1;
    else {
    var thumb_width = 100;
    var thumb_height = null;
    var factor = image.width / thumb_width;
    thumb_height = Math.round(image.height / factor);
    ratio = 100/ image.width;
    if (thumb_height > thumb_width) {
    thumb_height = 120;
    factor = image.height / thumb_height;
    thumb_width = Math.round(image.width / factor);
    ratio = 100/ image.width;
    var bmp = new air.BitmapData( thumb_width, thumb_height );
    var temp = air.File.createTempFile();
    var desktop = null;
    var matrix = new air.Matrix();
    var png = null;
    var stream = new air.FileStream();
    var div = null;
    var elem = null;
    matrix.scale( ratio,ratio );
    bmp.draw( image.content, matrix );
    png = runtime.com.adobe.images.PNGEncoder.encode( bmp );
    stream.open( temp, air.FileMode.WRITE );
    stream.writeBytes( png, 0, 0 );
    stream.close();
    desktop = air.File.desktopDirectory.resolvePath( toPNG(
    e.files[f] ) );
    temp.moveTo( desktop, true );
    image.load( new air.URLRequest(e.files[f] ) );
    function toPNG( orig )
    return orig.name.substr( 0, orig.name.length -
    orig.extension.length ) + 'png';
    The problem is, that the "thumbnail" is only created of the
    last selected image. I think it has something to do with the
    air.Event.COMPLETE event. But when I kick that off, an error
    occures: Error #2015: Invalid BitmapData. at
    flash.display::BitmapData().
    Hope somebody can help. Thanks in advance

    Here´s a nice example that does exactly what I want:
    <html>
    <head>
    <title>Thumbnails</title>
    <script src="library.swf"
    type="application/x-shockwave-flash"></script>
    <script src="AIRAliases.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    var MAX_HEIGHT = 100;
    var MAX_WIDTH = 100;
    var files = null;
    var index = 0;
    var loader = null;
    var output = null;
    function loadImages()
    if( index < files.length )
    output = document.createElement( 'div' );
    loader.load( new air.URLRequest( files[index].url ) );
    } else {
    loader.visible = false;
    function doLoad()
    loader = new air.Loader();
    loader.contentLoaderInfo.addEventListener(
    air.Event.COMPLETE, doLoaderComplete );
    window.nativeWindow.stage.addChild( loader );
    btnOpen.addEventListener( 'click', doOpenClick );
    function doFilesSelect( e )
    files = e.files;
    index = 0;
    loadImages();
    function doLoaderComplete()
    var bmpd = null;
    var encoder = null;
    var img = null;
    var jpg = null;
    var matrix = null;
    var ratio = 0;
    var realHeight = loader.contentLoaderInfo.height;
    var realWidth = loader.contentLoaderInfo.width;
    var stream = null;
    var thumb = null;
    var thumbHeight = 0;
    var thumbWidth = 0;
    if( realWidth > 0 )
    if( realWidth <= MAX_WIDTH )
    thumbHeight = realHeight;
    thumbWidth = realWidth;
    ratio = 1;
    } else {
    thumbWidth = MAX_WIDTH;
    thumbHeight = 0;
    factor = realWidth / thumbWidth;
    thumbHeight = Math.round( realHeight / factor );
    ratio = MAX_WIDTH / realWidth;
    if( thumbHeight > thumbWidth )
    thumbHeight = MAX_HEIGHT;
    factor = realHeight / thumbHeight;
    thumbWidth = Math.round( realWidth / factor );
    ratio = MAX_WIDTH / realWidth;
    matrix = new air.Matrix();
    matrix.scale( ratio, ratio );
    bmpd = new air.BitmapData( thumbWidth, thumbHeight );
    bmpd.draw( loader, matrix );
    encoder = new runtime.com.adobe.images.JPGEncoder( 85 );
    jpg = encoder.encode( bmpd );
    thumb = air.File.desktopDirectory.resolvePath( 'thumb_' +
    files[index].name );
    stream = new air.FileStream();
    stream.open( thumb, air.FileMode.WRITE );
    stream.writeBytes( jpg, 0, 0 );
    stream.close();
    output.innerHTML = files[index].name + ': ' + realWidth + '
    x ' + realHeight;
    document.body.appendChild( output );
    img = document.createElement( 'img' );
    img.src = thumb.url;
    output.appendChild( img );
    index = index + 1;
    loadImages();
    function doOpenClick()
    var browse = air.File.desktopDirectory;
    browse.addEventListener( air.FileListEvent.SELECT_MULTIPLE,
    doFilesSelect );
    browse.browseForOpenMultiple(
    'Select Images',
    [new air.FileFilter( 'Image Files',
    '*.gif;*.jpg;*.jpeg;*.png' )]
    </script>
    </head>
    <body onLoad="doLoad();">
    <input id="btnOpen" type="button" value="Open..." />
    </body>
    </html>

  • Can any tell me how to make Collage from selected images

    Hi
    I need to make a Collage of selected Images. Can anybody tell me how to proceed or point me a finger in the right direction. If there is an example then it would be great.
    Thanks in advance
    praveena

    One way you can do this is to override Panel, and set up clips, like this (mind you this is a very crude example. If you used this method, you'd want to set up loops and calculations to set the Polygon dimensions:
      private class MySubPanel  extends Panel {
        private Image[] images;
        private MySubPanel(Image[] _images) {
          images  = _images;
        public void paint(Graphics g) {
    // Just for a test, let's just assume only two Images are past in.
          int[]   xPnts = new int[] { 0,30,50,70,80, 95,75,60,45,30,15, 0},
                  yPnts = new int[] {20,35,15,35,20,110,75,95,70,85,55,30};
          Polygon p     = new Polygon(xPnts, yPnts, 12);
          g.setColor(new Color(50,150,20));
          g.setClip(p);
          g.drawImage(images[0], 0, 0, this);
          xPnts = new int[] { 0,15,30,45,60,75, 95, 80, 70, 50, 30,  0};
          yPnts = new int[] {30,55,85,70,95,75,220,130,145,135,155,130};
          p     = new Polygon(xPnts, yPnts, 12);
          g.setColor(new Color(50,150,20));
          g.setClip(p);
          g.drawImage(images[1], 0, 0, this);

  • How to remove a crop from selected images

    I need to create different crops on same image from one project, from project, to album, and smart folder i have one lot of crops and now i want to make other crops but the images in the project and blue folders have all the new crops too, how do i get back to a folder with no crops, I'd like to keep the retouches to these images though, i think i should have started differenttl?
    Help appreciated
    Thanks

    Not clear on what you have, but to remove the crop on any given image; you can either clear the check mark in the crop brick or remove the crop adjustment altogether. The crop brick shows in the Adjustment Inspector when you crop an image:
    http://documentation.apple.com/en/aperture/usermanual/#chapter=17%26section=10
    For more info on the crop tool:
    http://documentation.apple.com/en/aperture/usermanual/#chapter=18%26section=6%26 hash=apple_ref:doc:uid:Aperture-UserManual-91292MAD-1013949
    Note - typically, you would create a new version for additional cropped versions of the image. You can use the 'New Version from Master' command (control-click or right-click on image for the menu). This will create a new version to work on that is un-cropped whether the current version is cropped or not, but will not include any other adjustments either.

  • New Catalogue from selected images in other Catalogues

    Hi Guys,
    I have several Catalogues in Lightroom 2.5. I would like to select several images from each Catalogue and put them into a new Catalogue.
    The reason – In each Catalogue I have flagged the images that I want to print. I want to create a new Catalogue with only the flagged images from the other Catalogues in order to do a contact print or multi images on one sheet of paper.
    I know that I could create one Master Catalogue, select the flagged images and then print but I would like to just have a Print Catalogue that I could add images to, from other Catalogues.
    Its there a way to do this ?
    Thanks for your help.
    John

    In each catalogue, select the images and select File > Export as Catalogue. When you're finished, create a new catalogue, and then use File > Import as Catalog for each of the exported ones.
    When you're finished doing all this, do put some time aside to think what else you could have done with all the time you've just used up. With a single master catalogue, you would already have been admiring your prints and having a coffee, with your feet up on the desk too.
    Also see this thread http://www.lightroomforums.net/index.php?topic=8306.0
    John

  • Easy way to remove a keyword from select images

    Is there an easy way to remove a keyword?
    I want to remove a single keyword from nearly 100 images that have multiple keywords. The single keyword I want to remove exists in other images that I don't want it removed from.
    Any ideas?
    Thanks!

    Create a keyword button set and then either use the menu option to remove that keyword or the shortcut key.
    RB

  • How to get a value from  select one choice (created by static view)

    Hi,
    Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
    Edited by: 874530 on Jul 22, 2011 11:05 PM

    Thnax for your quick reply..
    Iam using 11.1.1.3.0 version.
    My code is
    <af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
    label="#{bindings.DenialLevel.label}"
    required="#{bindings.DenialLevel.hints.mandatory}"
    shortDesc="#{bindings.DenialLevel.hints.tooltip}"
    id="soc2"
    valuePassThru="true"
    binding="#{backing_denialcomment.denialLevelList}">
    <f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
    </af:selectOneChoice>
    and in bean am not able to get value of attribute .Iam getting only index...

  • Importing slideshow from iMovie 09

    I don't know if it is a brain cramp or what, but I am having difficulty importing my slideshow from iMovie 09 into iDVD. I carry out all of the steps when in iMovie and then when I go to the media tab, my movie is not there. Can someone please help???

    This is actually quite simple. I'm assuming you want it on a DVD? To do this go into iMovie and got to your slideshow. Click the Share tab and then iDVD. This brings up iDVD and you go on and create your main menu and burn a disc.

  • Heres a new one !make path from selection  adobe CS4 problems

    Hello   Ive had CS4 for about a week and i Tried make a path from selection with alliptical tool and it comes out all wonky  only rectangle tool is true to the its shape anything else is bugged. Ive deleted the settings folder on start up,reinstalled , tried all tolerence levels, reinstalled video card driver(nvidia 7600 gt) and turned on and off gl. Has anyone experienced this, can anyome help me?
    cheers

    bochansan wrote:
    That was the first thing I checked . Can someone else help? it would be a pity to give up so quick .Does uninstalling and and using a cleaner help? if so what does one recommend?   
    OK. That method is not very good anyway.
    Make the path using the Ellipse tool set to Paths In the Options Bar.

  • Illustrator 18.1 - Unable to create preview

    After upgrading to Illustrator 18.1 when I open a file I get an error "Unable to create preview" and all the artwork on the page is gone. I can see it in outline view, but not in preview mode.

    Hi Aneta G.,
    the ruler origin has changed with CS5.
    Maybe this can help a little to your understanding:
    // ArtboardsAddInEachQuadrant_CS5.jsx
    // regards pixxxelschubser
    var AB_1 = activeDocument.artboards.add([0,50,200,0]);
    AB_1.name = 'first quadrant';
    var AB_2 = activeDocument.artboards.add([-200,50,0,0]);
    AB_2.name = 'second quadrant';
    var AB_3 = activeDocument.artboards.add([-200,0,0,-50]);
    AB_3.name = 'third quadrant';
    var AB_4 = activeDocument.artboards.add([0,0,200,-50]);
    AB_4.name = 'fourth quadrant';
    Have fun

  • How can I take a single selected image from a slideshow to pass  to another page?

    I have a slideshow of several images from which a user needs to select one (for example the image that is featured in a lightbox after cicking the thumbnail) and then go to another page for further details on that image, with the same image displayed again, and where I want to embed some html to offer further options based on that selected image. How do I pass the name of the object from one page to another? How do I detect that a user has selected an image?
    I have tried setting each image in the lightbox as a hyperlink to a new page, and also tried setting its caption as a hyperlink, but neither of those ideas seem to work (at least in Preview).
    Any suggestions please? I am working in Muse CC 2014.

    Creating a hyperlink from the text caption should work. Try previewing: File/Preview Site in Browser to test.
    (I tested it using both Preview and File/Preview Site in Browser and it did link to the page I assigned)

  • How can I import selected images from a folder instead of the whole folder in iPhoto 9.5.2?

    Hi there,
    I was trying to help my parents import some photos from a folder they have created with photos from their holiday. They only want to import select images from this folder into iPhoto. I said it would be easy and they can do it in 2 ways. First, they can drag and drop selected photos from their folder into iPhoto - and this works for them. However, more convieniently, they can click file>import to Library and then select the photos they want by going into the folder... Well that's how it works on my iPhoto '11 at least. When they showed me their screen via Skype (they are running iPhoto 9.5.2), when they click import to library, and try to go into the folder containing their photos, it imports the whole thing and there appears to be no way that they can enter the folder to select just a few photos from what I could see.
    Does anyone know anything aout this problem?
    Cheers.

    What view are using in the Import dialogue. Column view might be easiest to navigate.

  • Selecting a specific Slideshow from iPhoto to view in Front Row

    Hello! Can anybody help me to get Front Row to play an individual Slideshow, please? The Help that Apple provides for using Front Row is very basic, and I've searched for an answer on these forums without any luck.
    When I open Front Row and navigate to Photos>Shared Photos>My Photos I then get a list of just the main headings in my iPhoto library. But each of these headings has individual grouped selections of photos. These are what I want to access, but they aren't accessible from Front Row. For example, if I select Slideshows, I have 36 of these, but Front Row just plays them all together as one slideshow. I don't want this - I want to select one at a time of course.
    Surely there must be a way of doing this? I cannot believe that Apple didn't think of this when they created Front Row, but the instructions for using the program in Mac Help are very brief. One other thing, I can only use Front Row to access my iPhoto library if I have iPhoto running. This seems very poor to me - the library is on the same hard drive - I am not accessing anybody else's library. Again, there is nothing in the Mac Help for Front Row which tells you you must have iPhoto open to view photos in Front Row.
    I do hope somebody can help me, because I especially bought my 27" iMac to view my photos, and being unable to select slideshows, or even subfolders for that matter, is most frustrating.
    Thank you,
    Bruce

    If anybody has stumbled across this thread, having a similar problem to mine, you might be interested in how things finally turned out.
    Eventually I contacted Apple technical support. They spent 90 minutes (yes, at 5p a minute) trying to fix it. They were very helpful, and suggested just about every blessed thing you might think of including dragging the iPhoto library out onto the desktop, creating a new one, dragging the files back in, repairing permissions with Disk Utility - one thing after another. Nothing worked - Front Row stubbornly refused to recognise my iPhoto library.
    In the end what we did was to drag the iPhoto library out (we tried that before, but this went a different route) and put it in folder in the Pictures folder. I gave the folder a name just to identify it. Then I Option-clicked the iPhoto application program (not the library!) and it asked me if I wanted to create a new library, which I did, so I let it create a new one back in the Pictures folder (this was why I moved the original one out of the way).
    So this opened, and of course was blank. So I went back to the Pictures folder in the Finder and opened the folder in which I hid the original iPhoto library. I Option-clicked this library and selected Show Package Contents. So now all the original files, folders and images were revealed. The only folder I needed now was one called Originals. I dragged this folder straight into the big empty window of my open iPhoto application, and iPhoto began to import all my original photos into the new copy of iPhoto.
    Now I have all my photos back, but unfortunately all my albums and slideshows are lost. But one good thing is in the main photos window, with View set to Event Titles, and Sort set to Dates, everything is clearly divided back into event and date order. I can easily select each group of photos which are nicely divided up for me, and create new folders, named with subjects or events, and then create new slideshows from them.
    OK it will take me a little while to get it back to how it was, but not quite the disaster it might have been if iPhoto had not been able to sort everything out from the metadata, into date order.
    I am grateful to Paul Horan, senior technical support advisor at Apple Care, who called me back with what was admittedly a drastic solution, after trying a few fixes himself.
    Hope this help someone else!
    Bruce

  • Create images with dynamic width from 3 images each (left/center/right-part)

    Hello,
    i want to employ a script to create images of dynamic width for me. The whole process shall base on different sized sets of images, which contain a left-image, a right-image and a center-image. The desired width for the different cases shall be reached by duplicating the center-image between the two outer images and placing those images next to each other until the image extends to desired width.
    The layers importet into Photoshop shall be importet as smart-layers (which i already solved).
    Has anyone done something similar already and could give me some useful hints on that issue ?
    I have come up to this until now:
    #target Photoshop
    // =========================== Opens a new document and asks for dimensions ============================
    var myLayerset = File.openDialog ("Select the set of images you want to use!", "*.png",true)
    var myName = prompt("How do you want to call the document?"); // askes for document name
    var width =  prompt("Please insert width for the output here!", ""); // askes for desired width
    var height = prompt("Please insert height for the output here!", ""); //askes for desired height
    var docName = myName +".psd"
    var idMk = charIDToTypeID( "Mk  " );
        var desc3 = new ActionDescriptor();
        var idNw = charIDToTypeID( "Nw  " );
            var desc4 = new ActionDescriptor();
            var idNm = charIDToTypeID( "Nm  " );
            desc4.putString( idNm, """Wunschname""" );
            var idMd = charIDToTypeID( "Md  " );
            var idRGBM = charIDToTypeID( "RGBM" );
            desc4.putClass( idMd, idRGBM );
            var idWdth = charIDToTypeID( "Wdth" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc4.putUnitDouble( idWdth, idRlt, width );
            var idHght = charIDToTypeID( "Hght" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc4.putUnitDouble( idHght, idRlt, height );
            var idRslt = charIDToTypeID( "Rslt" );
            var idRsl = charIDToTypeID( "#Rsl" );
            desc4.putUnitDouble( idRslt, idRsl, 72.000000 );
            var idpixelScaleFactor = stringIDToTypeID( "pixelScaleFactor" );
            desc4.putDouble( idpixelScaleFactor, 1.000000 );
            var idFl = charIDToTypeID( "Fl  " );
            var idFl = charIDToTypeID( "Fl  " );
            var idTrns = charIDToTypeID( "Trns" );
            desc4.putEnumerated( idFl, idFl, idTrns );
            var idDpth = charIDToTypeID( "Dpth" );
            desc4.putInteger( idDpth, 8 );
            var idprofile = stringIDToTypeID( "profile" );
            desc4.putString( idprofile, """sRGB IEC61966-2.1""" );
        var idDcmn = charIDToTypeID( "Dcmn" );
        desc3.putObject( idNw, idDcmn, desc4 );
    executeAction( idMk, desc3, DialogModes.NO );
    //==============================================save document================================================
    var idsave = charIDToTypeID( "save" );
        var desc4 = new ActionDescriptor();
        var idAs = charIDToTypeID( "As  " );
            var desc5 = new ActionDescriptor();
            var idmaximizeCompatibility = stringIDToTypeID( "maximizeCompatibility" );
            desc5.putBoolean( idmaximizeCompatibility, true );
        var idPhtthree = charIDToTypeID( "Pht3" );
        desc4.putObject( idAs, idPhtthree, desc5 );
        var idIn = charIDToTypeID( "In  " );
        desc4.putPath( idIn, new File( "C:\\Users\\ target folder goes here" + docName ) );
        var idDocI = charIDToTypeID( "DocI" );
        desc4.putInteger( idDocI, 308 );
        var idsaveStage = stringIDToTypeID( "saveStage" );
        var idsaveStageType = stringIDToTypeID( "saveStageType" );
        var idsaveSucceeded = stringIDToTypeID( "saveSucceeded" );
        desc4.putEnumerated( idsaveStage, idsaveStageType, idsaveSucceeded );
    executeAction( idsave, desc4, DialogModes.NO );
    //========================================================================================================
    for (var i = 0; i < myLayerset.length; i++) {
    if (myLayerset[i] instanceof File && myLayerset[i].hidden == false) {
    // ======================================================= opens selected images as smart objects====================
    var idOpn = charIDToTypeID( "Opn " );
        var desc1 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
       desc1.putPath( idnull, myLayerset[i]);
        var idsmartObject = stringIDToTypeID( "smartObject" );
        desc1.putBoolean( idsmartObject, true );
    executeAction( idOpn, desc1, DialogModes.NO );
    //===================================duplicates opened layer into created document========================================
    var idDplc = charIDToTypeID( "Dplc" );
        var desc144 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref135 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref135.putEnumerated( idLyr, idOrdn, idTrgt );
        desc144.putReference( idnull, ref135 );
        var idT = charIDToTypeID( "T   " );
            var ref136 = new ActionReference();
            var idDcmn = charIDToTypeID( "Dcmn" );
            ref136.putName( idDcmn, docName); 
        desc144.putReference( idT, ref136 );
        var idVrsn = charIDToTypeID( "Vrsn" );
        desc144.putInteger( idVrsn, 5 );
    executeAction( idDplc, desc144, DialogModes.NO );
    // ======================================================= close tab without saving ==========
    var idCls = charIDToTypeID( "Cls " );
        var desc156 = new ActionDescriptor();
        var idSvng = charIDToTypeID( "Svng" );
        var idYsN = charIDToTypeID( "YsN " );
        var idN = charIDToTypeID( "N   " );
        desc156.putEnumerated( idSvng, idYsN, idN );
    executeAction( idCls, desc156, DialogModes.NO );

    I adapted a Script somewhat, so you may give this a test.
    But it uses the open file so you would have to adapt it further.
    // arranges the selected jpg, tif, psd in line;
    // gutters may be irregular due to rounding effects;
    // thanks to michael l hale and muppet mark;
    // for mac and CS6;
    // 2014, use it at your own risk;
    #target photoshop
    if (app.documents.length == 0) {
              var myDocument = app.documents.add(UnitValue (300, "mm"), UnitValue (50, "mm"), 300, "new", NewDocumentMode.RGB, DocumentFill.TRANSPARENT)
    else {myDocument = app.activeDocument};
    // set to pixels;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var theArray = [0, 0, myDocument.width, myDocument.height];
    // select files;
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog ("please select files", '*.jpg;*.tif;*.pdf;*.psd', true)}
    else {var theFiles = File.openDialog ("please select exactly three files", getFiles, true)};
    // do the arrangement
    if (theFiles) {placeInLines (myDocument, theFiles, theArray)}
    app.preferences.rulerUnits = originalRulerUnits;
    ////// function to place images in lines //////
    function placeInLines (myDocument, theFiles, theArray) {
    theFiles.sort();
    // fit on screen;
    var idslct = charIDToTypeID( "slct" );
    var desc64 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref44 = new ActionReference();
    var idMn = charIDToTypeID( "Mn  " );
    var idMnIt = charIDToTypeID( "MnIt" );
    var idFtOn = charIDToTypeID( "FtOn" );
    ref44.putEnumerated( idMn, idMnIt, idFtOn );
    desc64.putReference( idnull, ref44 );
    executeAction( idslct, desc64, DialogModes.NO );
    // change pref;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    setToAccelerated();
    app.togglePalettes();
    var check = turnOffRescale ();
    // create the arrangement;
    if (theFiles.length > 0 && theFiles.length == 3) {
    myDocument.activeLayer = myDocument.layers[0];
    // create masked group;
    var theGroup = myDocument.layerSets.add();
    theGroup.name = "arrangement";
    // determine the array’s values;
    var areaWidth = theArray[2] - theArray[0];
    var areaHeight = theArray[3] - theArray[1];
    var theDocResolution = myDocument.resolution;
    var areaRelation = areaHeight / areaWidth;
    // center of placed non-pdf images;
    var centerX = Number(myDocument.width / 2);
    var centerY = Number(myDocument.height / 2);
    // suppress dialogs;
    var theDialogSettings = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;
    var pdfSinglePages = new Array;
    var nonPDFs = new Array;
    var theDimPDFs = new Array;
    var theLength = 0;
    // collect the files’ measurements;
    var theDimensions = new Array;
    var theLengths = new Array;
    // array to collect both files and placed pdf-pages;
    var theseFiles = new Array;
    var theLength = 0;
    // collect the files’ measurements;
    for (var o = 0; o < theFiles.length; o++) {
        var thisFile = theFiles[o];
              theseFiles.push(thisFile);
              var theDim = getDimensions(thisFile);
              theDimensions.push(theDim);
              theRelativeWidth = 100 / theDim[1] * theDim[0];
              theLength = theLength + theRelativeWidth;
    // reset dialogmodes;
    app.displayDialogs = DialogModes.ERROR;
    // if three files;
    if (theseFiles.length == 3) {
    // create the layers;
    var theNumber = 0;
    var theAdded = 0;
    var y = areaHeight / 2;
    // add placed image’s width;
    var thisLineWidth = 0 + theAdded;
    var theLastFactor = Number (Number(myDocument.height) / theDimensions[2][1] * theDimensions[2][2] / theDocResolution * 100);
    var theLastWidth = Math.round(theDimensions[2][0] * theLastFactor / 100 * theDocResolution / theDimensions[2][2]);
    // place the files;
    for (var x = 0; x < 3; x++) {
    var theNumber = x;
    var thisFile = theseFiles[theNumber];
    var theFactor = Number (Number(myDocument.height) / theDimensions[theNumber][1] * theDimensions[theNumber][2] / theDocResolution * 100);
    var theNewWidth = Math.round(theDimensions[theNumber][0] * theFactor / 100 * theDocResolution / theDimensions[theNumber][2]);
    var offsetX = theNewWidth / 2 + thisLineWidth - centerX + theArray[0];
    var offsetY = y - centerY + theArray[1];
    var theLayer = placeScaleFile (thisFile, offsetX, offsetY, theFactor, theFactor);
    myDocument.activeLayer.move(theGroup, ElementPlacement.PLACEATBEGINNING);
    thisLineWidth = thisLineWidth + theNewWidth;
    // duplicate the middle one;
    if (theNumber == 1) {
              while (thisLineWidth < myDocument.width - theLastWidth) {
                        theLayer = duplicateAndOffset (theLayer, theNewWidth, 0);
                        thisLineWidth = thisLineWidth + theNewWidth;
    // reset;
    app.togglePalettes();
    turnOnRescale (check);
    app.preferences.rulerUnits = originalRulerUnits;
    ////// playback to accelerated //////
    function setToAccelerated () {
              var idsetd = charIDToTypeID( "setd" );
              var desc1 = new ActionDescriptor();
              var idnull = charIDToTypeID( "null" );
                        var ref1 = new ActionReference();
                        var idPrpr = charIDToTypeID( "Prpr" );
                        var idPbkO = charIDToTypeID( "PbkO" );
                        ref1.putProperty( idPrpr, idPbkO );
                        var idcapp = charIDToTypeID( "capp" );
                        var idOrdn = charIDToTypeID( "Ordn" );
                        var idTrgt = charIDToTypeID( "Trgt" );
                        ref1.putEnumerated( idcapp, idOrdn, idTrgt );
              desc1.putReference( idnull, ref1 );
              var idT = charIDToTypeID( "T   " );
                        var desc2 = new ActionDescriptor();
                        var idperformance = stringIDToTypeID( "performance" );
                        var idperformance = stringIDToTypeID( "performance" );
                        var idaccelerated = stringIDToTypeID( "accelerated" );
                        desc2.putEnumerated( idperformance, idperformance, idaccelerated );
              var idPbkO = charIDToTypeID( "PbkO" );
              desc1.putObject( idT, idPbkO, desc2 );
              executeAction( idsetd, desc1, DialogModes.NO );
    ////// get psds, tifs and jpgs from files //////
    function getFiles (theFile) {
        if (theFile.name.match(/\.(jpg|tif|psd|pdf|)$/i)) {
            return true
    ////// place //////
    function placeScaleFile (file, xOffset, yOffset, theScale) {
    // =======================================================
    var idPlc = charIDToTypeID( "Plc " );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc5.putPath( idnull, new File( file ) );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc5.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc6 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc6.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc5.putObject( idOfst, idOfst, desc6 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idWdth, idPrc, theScale );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc5.putUnitDouble( idHght, idPrc, theScale );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc5.putBoolean( idLnkd, true );
    executeAction( idPlc, desc5, DialogModes.NO );
    return myDocument.activeLayer;
    ////// open pdf //////
    function openPDF (theImage, x) {
    // define pdfopenoptions;
    var pdfOpenOpts = new PDFOpenOptions;
    pdfOpenOpts.antiAlias = true;
    pdfOpenOpts.bitsPerChannel = BitsPerChannelType.EIGHT;
    pdfOpenOpts.cropPage = CropToType.TRIMBOX;
    pdfOpenOpts.mode = OpenDocumentMode.CMYK;
    pdfOpenOpts.resolution = 10;
    pdfOpenOpts.suppressWarnings = true;
    pdfOpenOpts.usePageNumber  = true;
    // suppress dialogs;
    var theDialogSettings = app.displayDialogs;
    app.displayDialogs = DialogModes.NO;
    pdfOpenOpts.page = x;
    var thePdf = app.open(theImage, pdfOpenOpts);
    thePdf.close(SaveOptions.DONOTSAVECHANGES);
    // reset dialogmodes;
    app.displayDialogs = theDialogSettings;
    ////// turn off preference to scale placed image //////
    function turnOffRescale () {
    // determine if the resize prefernce is on;
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var appDesc = executeActionGet(ref);
    var prefDesc = appDesc.getObjectValue(charIDToTypeID( "GnrP" ));
    var theResizePref = prefDesc.getBoolean(stringIDToTypeID( "resizePastePlace" ));
    // turn off resize image during place;
    if (theResizePref == true);{
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc12 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref4 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idGnrP = charIDToTypeID( "GnrP" );
            ref4.putProperty( idPrpr, idGnrP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref4.putEnumerated( idcapp, idOrdn, idTrgt );
        desc12.putReference( idnull, ref4 );
        var idT = charIDToTypeID( "T   " );
            var desc13 = new ActionDescriptor();
            var idresizePastePlace = stringIDToTypeID( "resizePastePlace" );
            desc13.putBoolean( idresizePastePlace, false );
        var idGnrP = charIDToTypeID( "GnrP" );
        desc12.putObject( idT, idGnrP, desc13 );
    executeAction( idsetd, desc12, DialogModes.NO );
    return theResizePref
    ////// turn on preference to scale plced image //////
    function turnOnRescale (check) {
    if (check == true) {
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc14 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idGnrP = charIDToTypeID( "GnrP" );
            ref5.putProperty( idPrpr, idGnrP );
            var idcapp = charIDToTypeID( "capp" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref5.putEnumerated( idcapp, idOrdn, idTrgt );
        desc14.putReference( idnull, ref5 );
        var idT = charIDToTypeID( "T   " );
            var desc15 = new ActionDescriptor();
            var idresizePastePlace = stringIDToTypeID( "resizePastePlace" );
            desc15.putBoolean( idresizePastePlace, true );
        var idGnrP = charIDToTypeID( "GnrP" );
        desc14.putObject( idT, idGnrP, desc15 );
    executeAction( idsetd, desc14, DialogModes.NO );
    ////// convert to so if not one aready //////
    function duplicateAndOffset (theLayer, theXOffset, theYOffset) {
    app.activeDocument.activeLayer = theLayer;
    // =======================================================
    var idcopy = charIDToTypeID( "copy" );
        var desc9 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref5 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref5.putEnumerated( idLyr, idOrdn, idTrgt );
        desc9.putReference( idnull, ref5 );
        var idT = charIDToTypeID( "T   " );
            var desc10 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idRlt = charIDToTypeID( "#Pxl" );
            desc10.putUnitDouble( idHrzn, idRlt, theXOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idRlt = charIDToTypeID( "#Pxl" );
            desc10.putUnitDouble( idVrtc, idRlt, theYOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc9.putObject( idT, idOfst, desc10 );
    executeAction( idcopy, desc9, DialogModes.NO );
    return app.activeDocument.activeLayer
    ////// load pdf as smart object //////
    function transformLayer (layer, percentage, xOffset, yOffset) {
    app.activeDocument.activeLayer = layer;
    // =======================================================
    var idTrnf = charIDToTypeID( "Trnf" );
        var desc4 = new ActionDescriptor();
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc4.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc5 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc5.putUnitDouble( idHrzn, idPxl, xOffset );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc5.putUnitDouble( idVrtc, idPxl, yOffset );
        var idOfst = charIDToTypeID( "Ofst" );
        desc4.putObject( idOfst, idOfst, desc5 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc4.putUnitDouble( idWdth, idPrc, percentage );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc4.putUnitDouble( idHght, idPrc, percentage );
        var idLnkd = charIDToTypeID( "Lnkd" );
        desc4.putBoolean( idLnkd, true );
        var idAntA = charIDToTypeID( "AntA" );
        desc4.putBoolean( idAntA, true );
    executeAction( idTrnf, desc4, DialogModes.NO );
    return app.activeDocument.activeLayer
    ////// function to get file’s dimensions, thanks to michael l hale //////
    function getDimensions( file ){
    function divideString (theString) {
              theString = String(theString);
        var a = Number(theString.slice(0, theString.indexOf("\/")));
        var b = Number(theString.slice(theString.indexOf("\/") + 1));
        return (a / b)
    // from a script by michael l hale;
    function loadXMPLibrary(){
         if ( !ExternalObject.AdobeXMPScript ){
              try{
                   ExternalObject.AdobeXMPScript = new ExternalObject
                                                                ('lib:AdobeXMPScript');
              }catch (e){
                   alert( ErrStrs.XMPLIB );
                   return false;
         return true;
    function unloadXMPLibrary(){
       if( ExternalObject.AdobeXMPScript ) {
          try{
             ExternalObject.AdobeXMPScript.unload();
             ExternalObject.AdobeXMPScript = undefined;
          }catch (e){
             alert( ErrStrs.XMPLIB );
    ////// based on a script by muppet mark //////
    function dimensionsShellScript (file) {
              try {
    // getMetaDataMDLS;
    if (File(file) instanceof File && File(file).exists) {
              var shellString = "/usr/bin/mdls ";
              shellString += File(file).fsName;
    //          shellString += File(file).fullName;
              shellString += ' > ~/Documents/StdOut2.txt';
              app.system(shellString);
    // read the file;
    if (File('~/Documents/StdOut2.txt').exists == true) {
        var file = File('~/Documents/StdOut2.txt');
        file.open("r");
        file.encoding= 'BINARY';
        var theText = new String;
        for (var m = 0; m < file.length; m ++) {
                        theText = theText.concat(file.readch());
              file.close();
              theText = theText.split("\n");
    // get the dimensions;
              var dim = new Array;
              for (var m = 0; m < theText.length; m++) {
                        var theLine = theText[m];
                        if (theLine.indexOf("kMDItemPixelWidth") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemPixelHeight") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemResolutionWidthDPI") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
                        if (theLine.indexOf("kMDItemResolutionHeightDPI") != -1) {dim.push(theLine.match(/[\d\.]+/g).join("") )}
    // remove file and hand back;
              File('~/Documents/StdOut2.txt').remove();
    catch (e) {
              if (File('~/Documents/StdOut2.txt').exists == true) {File('~/Documents/StdOut2.txt').remove()};
              return dim
              try{
                        loadXMPLibrary();
                        var xmpf = new XMPFile( file.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_READ );
                        var xmp = xmpf.getXMP();
                        xmpf.closeFile();
                        var resolutionUnit = xmp.getProperty( XMPConst.NS_TIFF, 'ResolutionUnit', XMPConst.STRING);
                        var resFactor = 1;
                        if (resolutionUnit == 2) {
                                  var resFactor = 1;
                        if (resolutionUnit == 3) {
                                  var resFactor = 2.54;
                        var dim = [xmp.getProperty( XMPConst.NS_EXIF, 'PixelXDimension', XMPConst.STRING),
                        xmp.getProperty( XMPConst.NS_EXIF, 'PixelYDimension', XMPConst.STRING),
                        divideString (xmp.getProperty( XMPConst.NS_TIFF, 'XResolution', XMPConst.STRING)) * resFactor,
                        divideString (xmp.getProperty( XMPConst.NS_TIFF, 'YResolution', XMPConst.STRING)) * resFactor];
                        unloadXMPLibrary();
                        if(dim[0]=="undefined" || dim[1]=="undefined"){
                var dim = undefined;
                var res = undefined;
                var bt = new BridgeTalk;
                bt.target = "bridge";
                var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+file.toSource()+");");
                bt.body = myScript;
                bt.onResult = function( inBT ) {myReturnValue(inBT.body); }
                bt.send(10);
                        function myReturnValue(str){
                                  res = str;
                                  dim = str.split(',');
                        function psRemote(file){
                                  var t= new Thumbnail(file);
                                  return t.core.quickMetadata.width+','+t.core.quickMetadata.height;
        }catch(e){unloadXMPLibrary()};
              if (String(dim[2]).indexOf("\/") != -1) {
                        var a = divideString(dim[2]);
                        var b = divideString(dim[3]);
                        dim = [dim[0], dim[1], a, b]
    // if dimensions are missing as might be the case with some bitmap tiffs for example try a shell-script;
              if (dim[0] == undefined || dim[1] == undefined) {
                        var array = dimensionsShellScript(file);
                        dim = array;
    // if shell-string failed open doc to get measurements;
              if (dim[0] == undefined || dim[1] == undefined) {
                        var thisDoc = app.open (File(file));
    // close ai without saving;
                        if (file.name.slice(-3).match(/\.(ai)$/i)) {
                                  thisDoc.trim(TrimType.TRANSPARENT);
                                  var dim = [thisDoc.width, thisDoc.height, thisDoc.resolution, thisDoc.resolution];
                                  thisDoc.close(SaveOptions.DONOTSAVECHANGES)
                        else {
                                  var dim = [thisDoc.width, thisDoc.height, thisDoc.resolution, thisDoc.resolution];
                                  thisDoc.close(SaveOptions.PROMPTTOSAVECHANGES)
    return dim;

Maybe you are looking for

  • I have encountered a peculiar problem in MM01 material master upload.

    I have encountered a peculiar problem in MM01 material master upload. The BDC program uploads data using Session method. The problem is when i process the session in foreground mode the data uploads successfully, but when i process it in background m

  • How do i authorize songs so they can go on my ipod touch?

    how do i authorize songs so they can go on my ipod touch?

  • Change Color on mouse click

    Hi Guys.  I have followed Ned's code from another post, whereby if a text button is clicked, the color will change.  The code is like var clicked:Boolean = false; var clicked2:Boolean = false; btn1.addEventListener(MouseEvent.CLICK, btn1click); funct

  • Brother dcp115c printer prints at a very slow speed

    after the installation of snow leopard, my printer prints at a very slow speed. anyone got suggestions on how to improve? thanks alot the driver version is correct.

  • Change Multiple Sites in Site Manager

    Our IT guys recently remapped one of our networked drives that housed all of the websites we have created. I know I can go in one by one and change the link in the site manager but was wondering if there was a single file that I could do a find and r