Batch Export Slideshows?  Automator?

I have about 15 lengthy slideshows to export to .mov files, this takes a while for each one. Is there anyway I can make it batch export so I don't have to keep hopping back to my computer to set the next one to export? Automator looks like a promising tool for this, but I'm not sure how to make it select a different slideshow each time and give it a different name? Any suggestions would be greatly appreciated.

No you can't batch them all at once because Quicktime is used for rendering the slideshow and it's a one at a time operation. It might be done with Applescript but you'd have to ask over in the Applescript forum for help with that.
TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

Similar Messages

  • Automator / Applescript Batch export

    Is it possible to create automator actions or applescript that will batch export a folder of keynote documents to .mov files?

    No you can't batch them all at once because Quicktime is used for rendering the slideshow and it's a one at a time operation. It might be done with Applescript but you'd have to ask over in the Applescript forum for help with that.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Exporting Slideshows in Different Formats

    Ok everyone, I'm having a few problems. I just recently ugraded to iPhoto 5.0.4 and everything is fine and dandy, but I'm wondering if there's any way that I can export slideshows that I create in different formats. Let me explain my situation; I'm a high school student in an Advanced Biology class, and our class has it's own website for the projects we do. My teacher has asked me to try to figure out a way to create slideshows with all the pictures we have for the different projects, then save/export them in a format that we can post on a web page. A friend of mine recommended that we make a page with links so that people could select their connection speed and format that they would like to download the file in, for example QuickTime, Real Player, Windows Media, Flash, etc... I've figured out how to export the files in QuickTime and Real Player compatible formats, but that's it. Any help or suggestions would be greatly appreciated, thank you.
    Jarrett

    Criag:
    Yes, iPhoto doesn't support the 16:9 format for exporting. I suggest you useiMovie HD 6. It's still available to Mac users who have iLife 08 and are not pleased with the new iMovie which has been dumbed down from the V6 version. If you add the 16:9 photos to it you can export to that ratio. Also you'll have much more control over the audio trachs being able to cut out portions, fad in and out, overlap etc.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Batch export possible?

    first a little backstory - my band recorded all of our songs at a real studio - we did all the instruments live going to 2" tape on a studer A-80 (for those of you who care). i took rough mixes home, and i have recorded all of my vocals in garageband to that mix for every song. i now have around 5-6 takes for all 6 songs we recorded, and i want to export every single vocal track separately so we can bring them back to the studio we recorded at, and mix them properly. does anyone know of a way to batch export every single track separately, rather than mute each one i want and export one at a time? i'm wondering if automator might be able to help?
    thanks in advance for any suggestions anyone may have.

    Thanks for the quick response, Jim.  I need the splash images to match the videos they came from, which are going to be all different sizes, so I don't think batch resizing will work.
    Do you know of any other software that can do this?  This may not be the place to ask that, but I wouldn't know where else to start.
    Thanks,
    Calvin

  • QuickTime batch export ?

    Hi,
    Can QuickTime Pro do movie batch export ?
    thanks

    With some Automator help it's easy to batch convert. If your setting requirements are identical use this Automator action:
    http://www.apple.com/downloads/macosx/automator/quicktimecompressionactionsandwo rkflow.html
    QuickTime 7 can also export more than one file and these settings can be different formats, codecs etc.
    Just open the file and export (you choose from the dialog windows). Open another file, change the settings and export. And again. And again.

  • API for batch export to CMS

    Hello Experts,
    I am trying to locate an API that could replicate the features of the publishing wizard, but for local wid files - ie, batch export local wid files to BOE.
    Is this possible?
    Regards,
    Bobby

    Does anyone have an Automator workflow or script that will give the same result as we can get from Quick Time Pro when we chose Export to Apple TV?Here is a RippleCast which may be of interest to you. You can open it directly in the QT Player using the "Open URL" File option:
    http://homepage.mac.com/jrwalker4/.Public/Automator for the People.mp4/
    In addition. remember that QT Pro is designed for parallel processing natively. You can, of course, open multiple source files and export them simultaneously rather than opting to "sequentially" process one file at a time, one file after the other. This approach does not save any time since each file is individually processed more slowly but has about the same effect as batch processing the same number of files sequentially. I usually just close the players and leave the multiple "Progress Bar" window open to monitor activity (or just go to bed) while QT is working.

  • How can I export slideshows created in Aperture v3.3.2 from Mid-2009 MacBook Pro-17 to blank DVDs?

    (Fifth futile attempt in two hours, before I learned there was a Post webpage – I’m new to ApSuppCom - and after I learned that I am not allowed to update previous content, so I had to back out, make a few changes, and start over.)  How can I export slideshows created in Aperture v3.3.2 (complete with superimposed captions and music tracks) from Mid-2009 MacBook Pro-17 to blank DVDs ?  (Some other specs: Mac OS Lion 10.7.5; Capacity 499.5 GB;  Processor 2.8 GHz Intel Core  2 Duo; Memory 4GB 1067 MHz DDR3; Graphics NVIDIA GeForce 9400M 256MB)
    I cannot do a copy (export) without various error messages appearing and the inevitable stoppage occurring.  Always with the DVD Video Player final message reading, “Supported disc not available.” Advisors and Mac Geniuses at local Apple Stores have told me to try Roxio Toast.  When I visited the Roxio website, and found numerous other company products, the descriptions all seemed to suggest that most of the apps shown can easily export videos to DVDs, but nothing was said about finished digital slide shows being exported.  At future events soon,  I hope to be handing out these finished DVDs (free) to the people in them.   Any help will be greatly appreciated. A.Z.

    How can I export slideshows created in Aperture v3.3.2 (complete with superimposed captions and music tracks) from Mid-2009 MacBook Pro-17 to blank DVDs ?
    Aperture cannot burn slideshows to a DVD.  It only can export a video of your slideshow.
    In Aperture 3 you use the "Export" button in Aperture's slideshow project to render a video to a folder on your disk.
    Then you use iDVD or another program to burn a video DVD.
    I cannot do a copy (export) without various error messages appearing and the inevitable stoppage occurring.  Always with the DVD Video Player final message reading, “Supported disc not available.”
    Could you please describe the exact steps that are causing these error messages?
    How are you exporting your slideshow from Aperture? Which settings are you using? And how are you importing the video to iDVD or Toast to burn a video DVD?
    For more suggestions see Karsten Schlüter's user tip: How to create a video-DVD? (Macs without iDVD)

  • How do i change the size of a clip using batch export?

    hi, when i try and do a batch export to change my clips from a DV PAL to PhotoJpeg 320*240 sized clips the "options" button is greyed out. so all i have as export settings are the QT presets in a pulldown list. is there any way i can create my own setting? (and the also save that?)
    thx

    what i'm seeing is that
    a) selecting all files in Media Man. gives me the option to size and set codecs but not the audio off.
    b) selecting all files in Batch Export allows me to pick a format (QT, aiff etc) choose a preset (photoJpeg included) select whether to include audio and video or both but not set the size or customize the QT settings
    c) selecting all clips then "file>export>using QT conversion" gives me all options, but seem to grab only the first clip.

  • Is there a way to select multiple sequences and batch export them using the same settings in CS6?

    I am a current Final Cut Pro7 user and looking to switch over to Premiere Pro CS6.  We edit approx. 100 short (15 sec.) videos daily, and then select them all at the end of the day and batch export them over night using the same export recipe for all. I have having trouble finding an easy way to do this in Premiere pro CS6, as command +E is grayed out if i select more than one sequence at a time. 
    so far, it appears that i have to select each video individually and manually set encoding recipe and export location for each....  Not only would this be terribly time consuming, but it leaves a lot of room for error and missed videos.  I thought i would be able to send all of the sequences to Adobe Media Encoder,  but i dont see that option either.
    Any suggestions/
    thanks!

    Open Media Encoder and add your Sequences:
    File > Add Premiere Pro Sequence
    Navigate to your Premiere Project and select it in the list.
    You can then select multiple Sequences from the Project (Ctrl+Click)
    and load them all at once into Media Encoder and apply
    the same encoding preset to all Sequences at the same time.

  • Why does iPhoto 9.5.1 not export slideshows?

    Why does iPhoto 9.5.1 stall when I try to export a slideshow, using OS 10.9.3? All steps have been completed, and the preview works fine, but the system hangs up at the "Exporting Slideshow" progress window. The bar never fills. Nada!

    Does this only happen for one particular slideshow? Test by creating another, short slideshow using different photos. Can you export this test slideshow? If yes, then probably one of your photos cannot be processed. Duplicate your slideshow and try to find the problematic photo by removing photos from the slideshow and trying again.
    If you cannot export any slide at all, create a new iPhoto library for testing. Use iPhoto's "File" menu to create a new library: File > Switch to library > Other/New. Import a few photos and try to export a Slideshow.  If exporting from a new library works, try to repair or rebuild your regular iPhoto library.
    You rebuild the library by launching either  iPhoto while holding down the key combination⌥⌘  (option-command)  and double-clicking  the iPhoto icon. Keep holding down the keys, until you are seeing the Library First Aid panel.  Select to "Repair"  the database.
    If that does not suffice, try "Rebuild".
    Back up your library before rebuilding.

  • No Method of Batch Export for Clips with Alpha Channels?

    Good morning,
    As many a flustered editor has eventually discovered, in order for FCP to export sequences with alpha channels to a 32-bit format, the timeline has to be un-rendered at the time of export, or else the transparent parts will appear black in the outputted file. This sort-of makes sense if you know how FCP and render files work, but in a perfect world I think I'd have designed the export interface a bit differently. Now that I think about it, I'm actually working in an Animation (Millions of Colors +) sequence, so converting transparent areas to black makes no logical sense at all.
    Anyway, I have several sequences that I would like to export as 32-bit TGA QuickTime files, preserving their transparency. If I Export Using Compressor, the process results in pre-rendering of the sequence, turning the transparent areas black. The same problem occurs if I export QuickTime reference movies from FCP and open them directly with Compressor.
    Does anyone know of a way to avoid this silly phenomenon or am I stuck individually exporting each sequence from FCP, one...at.......a................time?
    Thanks,
    Zap

    Thanks, Andy, "Batch Export" eventually did the trick!
    I forgot about that tool because I've never actually had to use it before! After playing around with it for a while, I found that as long as the sequence settings for each sequence in the batch are set to a codec with an activated alpha channel, it works just fine.
    Thanks again,
    Zap

  • How batch export layers to files png in cc

    I am having trouble with an export layers to files script i am wanting to batch export layer to png and this script i have seems to be the one i want although every time i run the script i get this error message "could not complete the action  since the destination folder doesn't exist" the script required me to hard code my destination path the path i require is "C:/Users/Tim/Desktop/Backdrops/png/" I am not completely sure why its stating it does not exist any help would be greatly appreciated. i have tried to contact the creator but the post it was on was very old.
    // enable double clicking from the Macintosh Finder or the Windows Explorer
    #target photoshop
    //=================================================================
    // Globals
    //=================================================================
    var exportPath = "/Users/pedr/Documents/Work/Clients/Pathways/Learning_Hub/Source/Comics/export";
    exportPath = exportPath + '/layers';
    // UI strings to be localized
    var strTitle = localize("$$$/JavaScripts/X2L/Title=X2L");
    var strButtonRun = localize("$$$/JavaScripts/X2L/Run=Run");
    var strButtonCancel = localize("$$$/JavaScripts/X2L/Cancel=Cancel");
    var strHelpText = localize("$$$/JavaScripts/X2L/Help=Please specify the format and location for saving each layer as a file.");
    var strLabelDestination = localize("$$$/JavaScripts/X2L/Destination=Destination:");
    var strButtonBrowse = localize("$$$/JavaScripts/X2L/Browse=&Browse...");
    var strLabelFileNamePrefix = localize("$$$/JavaScripts/X2L/FileNamePrefix=File Name Prefix:");
    var strCheckboxVisibleOnly = localize("$$$/JavaScripts/X2L/VisibleOnly=&Visible Layers Only");
    var strLabelFileType = localize("$$$/JavaScripts/X2L/FileType=File Type:");
    var strCheckboxIncludeICCProfile = localize("$$$/JavaScripts/X2L/IncludeICC=&Include ICC Profile");
    var strJPEGOptions = localize("$$$/JavaScripts/X2L/JPEGOptions=JPEG Options:");
    var strLabelQuality = localize("$$$/JavaScripts/X2L/Quality=Quality:");
    var strCheckboxMaximizeCompatibility = localize("$$$/JavaScripts/X2L/Maximize=&Maximize Compatibility");
    var strTIFFOptions = localize("$$$/JavaScripts/X2L/TIFFOptions=TIFF Options:");
    var strLabelImageCompression = localize("$$$/JavaScripts/X2L/ImageCompression=Image Compression:");
    var strNone = localize("$$$/JavaScripts/X2L/None=None");
    var strPDFOptions = localize("$$$/JavaScripts/X2L/PDFOptions=PDF Options:");
    var strLabelEncoding = localize("$$$/JavaScripts/X2L/Encoding=Encoding:");
    var strTargaOptions = localize("$$$/JavaScripts/X2L/TargaOptions=Targa Options:");
    var strLabelDepth = localize("$$$/JavaScripts/X2L/Depth=Depth:");
    var strRadiobutton16bit = localize("$$$/JavaScripts/X2L/Bit16=16bit");
    var strRadiobutton24bit = localize("$$$/JavaScripts/X2L/Bit24=24bit");
    var strRadiobutton32bit = localize("$$$/JavaScripts/X2L/Bit32=32bit");
    var strBMPOptions = localize("$$$/JavaScripts/X2L/BMPOptions=BMP Options:");
    var strAlertSpecifyDestination = localize("$$$/JavaScripts/X2L/SpecifyDestination=Please specify destination.");
    var strAlertDestinationNotExist = localize("$$$/JavaScripts/X2L/DestionationDoesNotExist=Destination does not exist.");
    var strTitleSelectDestination = localize("$$$/JavaScripts/X2L/SelectDestination=Select Destination");
    var strAlertDocumentMustBeOpened = localize("$$$/JavaScripts/X2L/OneDocument=You must have a document open to export!");
    var strAlertNeedMultipleLayers = localize("$$$/JavaScripts/X2L/NoLayers=You need a document with multiple layers to export!");
    var strAlertWasSuccessful = localize("$$$/JavaScripts/X2L/Success= was successful.");
    var strUnexpectedError = localize("$$$/JavaScripts/X2L/Unexpected=Unexpected error");
    var strMessage = localize("$$$/JavaScripts/X2L/Message=X2L");
    var stretQuality = localize( "$$$/locale_specific/JavaScripts/X2L/ETQualityLength=30" );
    var stretDestination = localize( "$$$/locale_specific/JavaScripts/X2L/ETDestinationLength=160" );
    var strddFileType = localize( "$$$/locale_specific/JavaScripts/X2L/DDFileType=100" );
    var strpnlOptions = localize( "$$$/locale_specific/JavaScripts/X2L/PNLOptions=100" );
    var strPNG8Options = localize("$$$/JavaScripts/X2L/PNG8Options=PNG-8 Options:");
    var strCheckboxPNGTransparency = localize("$$$/JavaScripts/X2L/Transparency=Transparency");
    var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/X2L/Interlaced=Interlaced");
    var strCheckboxPNGTrm = localize("$$$/JavaScripts/X2L/Trim=Trim Layers");
    var strPNG24Options = localize("$$$/JavaScripts/X2L/PNG24Options=PNG-24 Options:");
    // the drop down list indexes for file type
    var png24Index = 7;
    main();
    // Functions
    // Function: main
    // Usage: the core routine for this script
    // Input: <none>
    // Return: <none>
    function main() {
        if ( app.documents.length <= 0 ) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert( strAlertDocumentMustBeOpened );
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
        var exportInfo = new Object();
        initExportInfo(exportInfo);
        // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
        try {
        catch(e) {
            // it's ok if we don't have any options, continue with defaults
        try {
            var docName = app.activeDocument.name;  // save the app.activeDocument name before duplicate.
            var layerCount = app.documents[docName].layers.length;
            var layerSetsCount = app.documents[docName].layerSets.length;
            if ((layerCount <= 1)&&(layerSetsCount <= 0)) {
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    alert( strAlertNeedMultipleLayers );
                return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
            } else {
                var rememberMaximize;
                var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;
                app.activeDocument = app.documents[docName];
                var duppedDocument = app.activeDocument.duplicate();
                duppedDocument.activeLayer = duppedDocument.layers[duppedDocument.layers.length-1]; // for removing
                setInvisibleAllArtLayers(duppedDocument);
                exportChildren(duppedDocument, app.documents[docName], exportInfo, duppedDocument, exportInfo.fileNamePrefix);
                duppedDocument.close( SaveOptions.DONOTSAVECHANGES );
                if ( rememberMaximize != undefined ) {
                    app.preferences.maximizeCompatibility = rememberMaximize;
                if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
                    //alert(strTitle + strAlertWasSuccessful);
                app.playbackDisplayDialogs = DialogModes.ALL;
        } catch (e) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert(e);
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
    // Function: settingDialog
    // Usage: pop the ui and get user settings
    // Input: exportInfo object containing our parameters
    // Return: on ok, the dialog info is set to the exportInfo object
    function settingDialog(exportInfo) {
      return;
    // Function: hideAllFileTypePanel
    // Usage: hide all the panels in the common actions
    // Input: <none>, dlgMain is a global for this script
    // Return: <none>, all panels are now hidden
    function hideAllFileTypePanel() {
    // Function: initExportInfo
    // Usage: create our default parameters
    // Input: a new Object
    // Return: a new object with params set to default
    function initExportInfo(exportInfo) {
        //exportInfo.destination = new String(exportPath);
        exportInfo.fileNamePrefix = new String("untitled_");
        exportInfo.visibleOnly = false;
        exportInfo.fileType = png24Index;
        exportInfo.icc = true;
        exportInfo.png24Transparency = true;
        exportInfo.png24Interlaced = false;
        exportInfo.png24Trim = true;
        try {
            exportInfo.destination = Folder(new String(exportPath)).fsName; // destination folder
            var tmp = app.activeDocument.fullName.name;
            exportInfo.fileNamePrefix = decodeURI(tmp.substring(0, tmp.indexOf("."))); // filename body part
        } catch(someError) {
            exportInfo.destination = new String(exportPath);
            exportInfo.fileNamePrefix = app.activeDocument.name; // filename body part
    // Function: saveFile
    // Usage: the worker routine, take our params and save the file accordingly
    // Input: reference to the document, the name of the output file,
    //        export info object containing more information
    // Return: <none>, a file on disk
    function saveFile( docRef, fileNameBody, exportInfo) {
                saveFile(docRef, fileNameBody, exportInfo, false, true);
                function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
                var id6 = charIDToTypeID( "Expr" );
                    var desc3 = new ActionDescriptor();
                    var id7 = charIDToTypeID( "Usng" );
                        var desc4 = new ActionDescriptor();
                        var id8 = charIDToTypeID( "Op  " );
                        var id9 = charIDToTypeID( "SWOp" );
                        var id10 = charIDToTypeID( "OpSa" );
                        desc4.putEnumerated( id8, id9, id10 );
                        var id11 = charIDToTypeID( "Fmt " );
                        var id12 = charIDToTypeID( "IRFm" );
                        var id13 = charIDToTypeID( "PN24" );
                        desc4.putEnumerated( id11, id12, id13 );
                        var id14 = charIDToTypeID( "Intr" );
                        desc4.putBoolean( id14, interlacedValue );
                        var id15 = charIDToTypeID( "Trns" );
                        desc4.putBoolean( id15, transparencyValue );
                        var id16 = charIDToTypeID( "Mtt " );
                        desc4.putBoolean( id16, true );
                        var id17 = charIDToTypeID( "MttR" );
                        desc4.putInteger( id17, 255 );
                        var id18 = charIDToTypeID( "MttG" );
                        desc4.putInteger( id18, 255 );
                        var id19 = charIDToTypeID( "MttB" );
                        desc4.putInteger( id19, 255 );
                        var id20 = charIDToTypeID( "SHTM" );
                        desc4.putBoolean( id20, false );
                        var id21 = charIDToTypeID( "SImg" );
                        desc4.putBoolean( id21, true );
                        var id22 = charIDToTypeID( "SSSO" );
                        desc4.putBoolean( id22, false );
                        var id23 = charIDToTypeID( "SSLt" );
                            var list1 = new ActionList();
                        desc4.putList( id23, list1 );
                        var id24 = charIDToTypeID( "DIDr" );
                        desc4.putBoolean( id24, false );
                        var id25 = charIDToTypeID( "In  " );
                        desc4.putPath( id25, new File( exportPath + "C:/Users/Tim/Desktop/Backdrops/png/"  + fileNameBody + ".png") );
                    var id26 = stringIDToTypeID( "SaveForWeb" );
                    desc3.putObject( id7, id26, desc4 );
                executeAction( id6, desc3, DialogModes.NO );
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function zeroSuppress (num, digit) {
        var tmp = num.toString();
        while (tmp.length < digit) {
            tmp = "0" + tmp;
        return tmp;
    // Function: setInvisibleAllArtLayers
    // Usage: unlock and make invisible all art layers, recursively
    // Input: document or layerset
    // Return: all art layers are unlocked and invisible
    function setInvisibleAllArtLayers(obj) {
        for( var i = 0; i < obj.artLayers.length; i++) {
            obj.artLayers[i].allLocked = false;
            obj.artLayers[i].visible = false;
        for( var i = 0; i < obj.layerSets.length; i++) {
            setInvisibleAllArtLayers(obj.layerSets[i]);
    // Function: removeAllInvisibleArtLayers
    // Usage: remove all the invisible art layers, recursively
    // Input: document or layer set
    // Return: <none>, all layers that were invisible are now gone
    function removeAllInvisibleArtLayers(obj) {
        for( var i = obj.artLayers.length-1; 0 <= i; i--) {
            try {
                if(!obj.artLayers[i].visible) {
                    obj.artLayers[i].remove();
            catch (e) {
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            removeAllInvisibleArtLayers(obj.layerSets[i]);
    // Function: removeAllEmptyLayerSets
    // Usage: find all empty layer sets and remove them, recursively
    // Input: document or layer set
    // Return: empty layer sets are now gone
    function removeAllEmptyLayerSets(obj) {
        var foundEmpty = true;
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            if( removeAllEmptyLayerSets(obj.layerSets[i])) {
                obj.layerSets[i].remove();
            } else {
                foundEmpty = false;
        if (obj.artLayers.length > 0) {
            foundEmpty = false;
        return foundEmpty;
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function removeAllInvisible(docRef) {
        removeAllInvisibleArtLayers(docRef);
        removeAllEmptyLayerSets(docRef);
    // Function: exportChildren
    // Usage: find all the children in this document to save
    // Input: duplicate document, original document, export info,
    //        reference to document, starting file name
    // Return: <none>, documents are saved accordingly
    function exportChildren(dupObj, orgObj, exportInfo, dupDocRef, fileNamePrefix) {
        for( var i = 0; i < dupObj.artLayers.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.artLayers[i].visible) {
                    continue;
            dupObj.artLayers[i].visible = true;
            var layerName = dupObj.artLayers[i].name;  // store layer name before change doc
            var duppedDocumentTmp = dupDocRef.duplicate();
            if ((png24Index == exportInfo.fileType)||(png8Index == exportInfo.fileType)) { // PSD: Keep transparency
                removeAllInvisible(duppedDocumentTmp);
                //PNGFileOptions
                        if (activeDocument.activeLayer.isBackgroundLayer == false) { //is it anything but a background layer?
                            app.activeDocument.trim(TrimType.TRANSPARENT);
            } else { // just flatten
                duppedDocumentTmp.flatten();
            // Edit
            var docName = app.activeDocument.name;
            // For some reason indexOf fails if we include the '-', so we use 'copy' and decrement the index by 1.
            docName = docName.slice(0, docName.indexOf('copy')-1);
            var fileNameBody = (docName+'_'+layerName).toLowerCase();
            fileNameBody = fileNameBody.replace(/[:\/\\*\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'
            if (fileNameBody.length > 120) {
                fileNameBody = fileNameBody.substring(0,120);
            saveFile(duppedDocumentTmp, fileNameBody, exportInfo);
            duppedDocumentTmp.close(SaveOptions.DONOTSAVECHANGES);
            dupObj.artLayers[i].visible = false;
        for( var i = 0; i < dupObj.layerSets.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.layerSets[i].visible) {
                    continue;
            var fileNameBody = fileNamePrefix;
            fileNameBody += "_" + zeroSuppress(i, 4) + "s";
            exportChildren(dupObj.layerSets[i], orgObj.layerSets[i], exportInfo, dupDocRef, fileNameBody);  // recursive call
    // Function: objectToDescriptor
    // Usage: create an ActionDescriptor from a JavaScript Object
    // Input: JavaScript Object (o)
    //        object unique string (s)
    //        Pre process converter (f)
    // Return: ActionDescriptor
    // NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function objectToDescriptor (o, s, f) {
        o = {};
        var d = new ActionDescriptor;
        var l = o.reflect.properties.length;
        d.putString( app.charIDToTypeID( 'Msge' ), s );
        for (var i = 0; i < l; i++ ) {
            var k = o.reflect.properties[i].toString();
            if (k == "__proto__" || k == "__count__" || k == "__class__" || k == "reflect")
                continue;
            var v = o[ k ];
            k = app.stringIDToTypeID(k);
            switch ( typeof(v) ) {
                case "boolean":
                    d.putBoolean(k, v);
                    break;
                case "string":
                    d.putString(k, v);
                    break;
                case "number":
                    d.putDouble(k, v);
                    break;
                default:
                    if ( v instanceof UnitValue ) {
                        var uc = new Object;
                        uc["px"] = charIDToTypeID("#Rlt"); // unitDistance
                        uc["%"] = charIDToTypeID("#Prc"); // unitPercent
                        d.putUnitDouble(k, uc[v.type], v.value);
                    } else {
                        throw( new Error("Unsupported type in objectToDescriptor " + typeof(v) ) );
        return d;
    // Function: descriptorToObject
    // Usage: update a JavaScript Object from an ActionDescriptor
    // Input: JavaScript Object (o), current object to update (output)
    //        Photoshop ActionDescriptor (d), descriptor to pull new params for object from
    //        object unique string (s)
    //        JavaScript Function (f), post process converter utility to convert
    // Return: Nothing, update is applied to passed in JavaScript Object (o)
    // NOTE: Only boolean, string, number and UnitValue are supported, use a post processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function descriptorToObject (o, d, s, f) {
        var l = d.count;
        if (l) {
            var keyMessage = app.charIDToTypeID( 'Msge' );
            if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;
        for (var i = 0; i < l; i++ ) {
            var k = d.getKey(i); // i + 1 ?
            var t = d.getType(k);
            strk = app.typeIDToStringID(k);
            switch (t) {
                case DescValueType.BOOLEANTYPE:
                    o[strk] = d.getBoolean(k);
                    break;
                case DescValueType.STRINGTYPE:
                    o[strk] = d.getString(k);
                    break;
                case DescValueType.DOUBLETYPE:
                    o[strk] = d.getDouble(k);
                    break;
                case DescValueType.UNITDOUBLE:
                    var uc = new Object;
                    uc[charIDToTypeID("#Rlt")] = "px"; // unitDistance
                    uc[charIDToTypeID("#Prc")] = "%"; // unitPercent
                    uc[charIDToTypeID("#Pxl")] = "px"; // unitPixels
                    var ut = d.getUnitDoubleType(k);
                    var uv = d.getUnitDoubleValue(k);
                    o[strk] = new UnitValue( uv, uc[ut] );
                    break;
                case DescValueType.INTEGERTYPE:
                case DescValueType.ALIASTYPE:
                case DescValueType.CLASSTYPE:
                case DescValueType.ENUMERATEDTYPE:
                case DescValueType.LISTTYPE:
                case DescValueType.OBJECTTYPE:
                case DescValueType.RAWTYPE:
                case DescValueType.REFERENCETYPE:
                default:
                    throw( new Error("Unsupported type in descriptorToObject " + t ) );
        if (undefined != f) {
            o = f(o);
    // Function: preProcessExportInfo
    // Usage: convert Photoshop enums to strings for storage
    // Input: JavaScript Object of my params for this script
    // Return: JavaScript Object with objects converted for storage
    function preProcessExportInfo(o) {
        o.tiffCompression = o.tiffCompression.toString();
        o.pdfEncoding = o.pdfEncoding.toString();
        o.targaDepth = o.targaDepth.toString();
        o.bmpDepth = o.bmpDepth.toString();
        return o;
    // Function: postProcessExportInfo
    // Usage: convert strings from storage to Photoshop enums
    // Input: JavaScript Object of my params in string form
    // Return: JavaScript Object with objects in enum form
    function postProcessExportInfo(o) {
        o.tiffCompression = eval(o.tiffCompression);
        o.pdfEncoding = eval(o.pdfEncoding);
        o.targaDepth = eval(o.targaDepth);
        o.bmpDepth = eval(o.bmpDepth);
        return o;
    // Function: StrToIntWithDefault
    // Usage: convert a string to a number, first stripping all characters
    // Input: string and a default number
    // Return: a number
    function StrToIntWithDefault( s, n ) {
        var onlyNumbers = /[^0-9]/g;
        var t = s.replace( onlyNumbers, "" );
        t = parseInt( t );
        if ( ! isNaN( t ) ) {
            n = t;
        return n;
    // End X2L.jsx

    I have put the like var exportPath = "~/Desktop/Backdrops/png/";  and have removed the exportPath = exportPath + '/layers';
    but when i run the script it still comes up with the error
    could not complete action since the destination folder does not exist
    if you are using the extendedscript toolkit would be able to run the script and see if you know were the problem is coming from i cant seem to understand why its not seeing the destination.
    thanks for all your help
    // enable double clicking from the Macintosh Finder or the Windows Explorer
    #target photoshop
    //=================================================================
    // Globals
    //=================================================================
    var exportPath = "~/Desktop/Backdrops/png/";
    // UI strings to be localized
    var strTitle = localize("$$$/JavaScripts/X2L/Title=X2L");
    var strButtonRun = localize("$$$/JavaScripts/X2L/Run=Run");
    var strButtonCancel = localize("$$$/JavaScripts/X2L/Cancel=Cancel");
    var strHelpText = localize("$$$/JavaScripts/X2L/Help=Please specify the format and location for saving each layer as a file.");
    var strLabelDestination = localize("$$$/JavaScripts/X2L/Destination=Destination:");
    var strButtonBrowse = localize("$$$/JavaScripts/X2L/Browse=&Browse...");
    var strLabelFileNamePrefix = localize("$$$/JavaScripts/X2L/FileNamePrefix=File Name Prefix:");
    var strCheckboxVisibleOnly = localize("$$$/JavaScripts/X2L/VisibleOnly=&Visible Layers Only");
    var strLabelFileType = localize("$$$/JavaScripts/X2L/FileType=File Type:");
    var strCheckboxIncludeICCProfile = localize("$$$/JavaScripts/X2L/IncludeICC=&Include ICC Profile");
    var strJPEGOptions = localize("$$$/JavaScripts/X2L/JPEGOptions=JPEG Options:");
    var strLabelQuality = localize("$$$/JavaScripts/X2L/Quality=Quality:");
    var strCheckboxMaximizeCompatibility = localize("$$$/JavaScripts/X2L/Maximize=&Maximize Compatibility");
    var strTIFFOptions = localize("$$$/JavaScripts/X2L/TIFFOptions=TIFF Options:");
    var strLabelImageCompression = localize("$$$/JavaScripts/X2L/ImageCompression=Image Compression:");
    var strNone = localize("$$$/JavaScripts/X2L/None=None");
    var strPDFOptions = localize("$$$/JavaScripts/X2L/PDFOptions=PDF Options:");
    var strLabelEncoding = localize("$$$/JavaScripts/X2L/Encoding=Encoding:");
    var strTargaOptions = localize("$$$/JavaScripts/X2L/TargaOptions=Targa Options:");
    var strLabelDepth = localize("$$$/JavaScripts/X2L/Depth=Depth:");
    var strRadiobutton16bit = localize("$$$/JavaScripts/X2L/Bit16=16bit");
    var strRadiobutton24bit = localize("$$$/JavaScripts/X2L/Bit24=24bit");
    var strRadiobutton32bit = localize("$$$/JavaScripts/X2L/Bit32=32bit");
    var strBMPOptions = localize("$$$/JavaScripts/X2L/BMPOptions=BMP Options:");
    var strAlertSpecifyDestination = localize("$$$/JavaScripts/X2L/SpecifyDestination=Please specify destination.");
    var strAlertDestinationNotExist = localize("$$$/JavaScripts/X2L/DestionationDoesNotExist=Destination does not exist.");
    var strTitleSelectDestination = localize("$$$/JavaScripts/X2L/SelectDestination=Select Destination");
    var strAlertDocumentMustBeOpened = localize("$$$/JavaScripts/X2L/OneDocument=You must have a document open to export!");
    var strAlertNeedMultipleLayers = localize("$$$/JavaScripts/X2L/NoLayers=You need a document with multiple layers to export!");
    var strAlertWasSuccessful = localize("$$$/JavaScripts/X2L/Success= was successful.");
    var strUnexpectedError = localize("$$$/JavaScripts/X2L/Unexpected=Unexpected error");
    var strMessage = localize("$$$/JavaScripts/X2L/Message=X2L");
    var stretQuality = localize( "$$$/locale_specific/JavaScripts/X2L/ETQualityLength=30" );
    var stretDestination = localize( "$$$/locale_specific/JavaScripts/X2L/ETDestinationLength=160" );
    var strddFileType = localize( "$$$/locale_specific/JavaScripts/X2L/DDFileType=100" );
    var strpnlOptions = localize( "$$$/locale_specific/JavaScripts/X2L/PNLOptions=100" );
    var strPNG8Options = localize("$$$/JavaScripts/X2L/PNG8Options=PNG-8 Options:");
    var strCheckboxPNGTransparency = localize("$$$/JavaScripts/X2L/Transparency=Transparency");
    var strCheckboxPNGInterlaced = localize("$$$/JavaScripts/X2L/Interlaced=Interlaced");
    var strCheckboxPNGTrm = localize("$$$/JavaScripts/X2L/Trim=Trim Layers");
    var strPNG24Options = localize("$$$/JavaScripts/X2L/PNG24Options=PNG-24 Options:");
    // the drop down list indexes for file type
    var png24Index = 7;
    main();
    // Functions
    // Function: main
    // Usage: the core routine for this script
    // Input: <none>
    // Return: <none>
    function main() {
        if ( app.documents.length <= 0 ) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert( strAlertDocumentMustBeOpened );
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
        var exportInfo = new Object();
        initExportInfo(exportInfo);
        // look for last used params via Photoshop registry, getCustomOptions will throw if none exist
        try {
        catch(e) {
            // it's ok if we don't have any options, continue with defaults
        try {
            var docName = app.activeDocument.name;  // save the app.activeDocument name before duplicate.
            var layerCount = app.documents[docName].layers.length;
            var layerSetsCount = app.documents[docName].layerSets.length;
            if ((layerCount <= 1)&&(layerSetsCount <= 0)) {
                if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                    alert( strAlertNeedMultipleLayers );
                return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
            } else {
                var rememberMaximize;
                var needMaximize = exportInfo.psdMaxComp ? QueryStateType.ALWAYS : QueryStateType.NEVER;
                app.activeDocument = app.documents[docName];
                var duppedDocument = app.activeDocument.duplicate();
                duppedDocument.activeLayer = duppedDocument.layers[duppedDocument.layers.length-1]; // for removing
                setInvisibleAllArtLayers(duppedDocument);
                exportChildren(duppedDocument, app.documents[docName], exportInfo, duppedDocument, exportInfo.fileNamePrefix);
                duppedDocument.close( SaveOptions.DONOTSAVECHANGES );
                if ( rememberMaximize != undefined ) {
                    app.preferences.maximizeCompatibility = rememberMaximize;
                if ( DialogModes.ALL == app.playbackDisplayDialogs ) {
                    //alert(strTitle + strAlertWasSuccessful);
                app.playbackDisplayDialogs = DialogModes.ALL;
        } catch (e) {
            if ( DialogModes.NO != app.playbackDisplayDialogs ) {
                alert(e);
            return 'cancel'; // quit, returning 'cancel' (dont localize) makes the actions palette not record our script
    // Function: settingDialog
    // Usage: pop the ui and get user settings
    // Input: exportInfo object containing our parameters
    // Return: on ok, the dialog info is set to the exportInfo object
    function settingDialog(exportInfo) {
      return;
    // Function: hideAllFileTypePanel
    // Usage: hide all the panels in the common actions
    // Input: <none>, dlgMain is a global for this script
    // Return: <none>, all panels are now hidden
    function hideAllFileTypePanel() {
    // Function: initExportInfo
    // Usage: create our default parameters
    // Input: a new Object
    // Return: a new object with params set to default
    function initExportInfo(exportInfo) {
        //exportInfo.destination = new String(exportPath);
        exportInfo.fileNamePrefix = new String("untitled_");
        exportInfo.visibleOnly = false;
        exportInfo.fileType = png24Index;
        exportInfo.icc = true;
        exportInfo.png24Transparency = true;
        exportInfo.png24Interlaced = false;
        exportInfo.png24Trim = true;
        try {
            exportInfo.destination = Folder(new String(exportPath)).fsName; // destination folder
            var tmp = app.activeDocument.fullName.name;
            exportInfo.fileNamePrefix = decodeURI(tmp.substring(0, tmp.indexOf("."))); // filename body part
        } catch(someError) {
            exportInfo.destination = new String(exportPath);
            exportInfo.fileNamePrefix = app.activeDocument.name; // filename body part
    // Function: saveFile
    // Usage: the worker routine, take our params and save the file accordingly
    // Input: reference to the document, the name of the output file,
    //        export info object containing more information
    // Return: <none>, a file on disk
    function saveFile( docRef, fileNameBody, exportInfo) {
                saveFile(docRef, fileNameBody, exportInfo, false, true);
                function saveFile( docRef, fileNameBody, exportInfo, interlacedValue, transparencyValue) {
                var id6 = charIDToTypeID( "Expr" );
                    var desc3 = new ActionDescriptor();
                    var id7 = charIDToTypeID( "Usng" );
                        var desc4 = new ActionDescriptor();
                        var id8 = charIDToTypeID( "Op  " );
                        var id9 = charIDToTypeID( "SWOp" );
                        var id10 = charIDToTypeID( "OpSa" );
                        desc4.putEnumerated( id8, id9, id10 );
                        var id11 = charIDToTypeID( "Fmt " );
                        var id12 = charIDToTypeID( "IRFm" );
                        var id13 = charIDToTypeID( "PN24" );
                        desc4.putEnumerated( id11, id12, id13 );
                        var id14 = charIDToTypeID( "Intr" );
                        desc4.putBoolean( id14, interlacedValue );
                        var id15 = charIDToTypeID( "Trns" );
                        desc4.putBoolean( id15, transparencyValue );
                        var id16 = charIDToTypeID( "Mtt " );
                        desc4.putBoolean( id16, true );
                        var id17 = charIDToTypeID( "MttR" );
                        desc4.putInteger( id17, 255 );
                        var id18 = charIDToTypeID( "MttG" );
                        desc4.putInteger( id18, 255 );
                        var id19 = charIDToTypeID( "MttB" );
                        desc4.putInteger( id19, 255 );
                        var id20 = charIDToTypeID( "SHTM" );
                        desc4.putBoolean( id20, false );
                        var id21 = charIDToTypeID( "SImg" );
                        desc4.putBoolean( id21, true );
                        var id22 = charIDToTypeID( "SSSO" );
                        desc4.putBoolean( id22, false );
                        var id23 = charIDToTypeID( "SSLt" );
                            var list1 = new ActionList();
                        desc4.putList( id23, list1 );
                        var id24 = charIDToTypeID( "DIDr" );
                        desc4.putBoolean( id24, false );
                        var id25 = charIDToTypeID( "In  " );
                        desc4.putPath( id25, new File( exportPath + "C:/Users/Tim/Desktop/Backdrops/png/"  + fileNameBody + ".png") );
                    var id26 = stringIDToTypeID( "SaveForWeb" );
                    desc3.putObject( id7, id26, desc4 );
                executeAction( id6, desc3, DialogModes.NO );
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function zeroSuppress (num, digit) {
        var tmp = num.toString();
        while (tmp.length < digit) {
            tmp = "0" + tmp;
        return tmp;
    // Function: setInvisibleAllArtLayers
    // Usage: unlock and make invisible all art layers, recursively
    // Input: document or layerset
    // Return: all art layers are unlocked and invisible
    function setInvisibleAllArtLayers(obj) {
        for( var i = 0; i < obj.artLayers.length; i++) {
            obj.artLayers[i].allLocked = false;
            obj.artLayers[i].visible = false;
        for( var i = 0; i < obj.layerSets.length; i++) {
            setInvisibleAllArtLayers(obj.layerSets[i]);
    // Function: removeAllInvisibleArtLayers
    // Usage: remove all the invisible art layers, recursively
    // Input: document or layer set
    // Return: <none>, all layers that were invisible are now gone
    function removeAllInvisibleArtLayers(obj) {
        for( var i = obj.artLayers.length-1; 0 <= i; i--) {
            try {
                if(!obj.artLayers[i].visible) {
                    obj.artLayers[i].remove();
            catch (e) {
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            removeAllInvisibleArtLayers(obj.layerSets[i]);
    // Function: removeAllEmptyLayerSets
    // Usage: find all empty layer sets and remove them, recursively
    // Input: document or layer set
    // Return: empty layer sets are now gone
    function removeAllEmptyLayerSets(obj) {
        var foundEmpty = true;
        for( var i = obj.layerSets.length-1; 0 <= i; i--) {
            if( removeAllEmptyLayerSets(obj.layerSets[i])) {
                obj.layerSets[i].remove();
            } else {
                foundEmpty = false;
        if (obj.artLayers.length > 0) {
            foundEmpty = false;
        return foundEmpty;
    // Function: zeroSuppress
    // Usage: return a string padded to digit(s)
    // Input: num to convert, digit count needed
    // Return: string padded to digit length
    function removeAllInvisible(docRef) {
        removeAllInvisibleArtLayers(docRef);
        removeAllEmptyLayerSets(docRef);
    // Function: exportChildren
    // Usage: find all the children in this document to save
    // Input: duplicate document, original document, export info,
    //        reference to document, starting file name
    // Return: <none>, documents are saved accordingly
    function exportChildren(dupObj, orgObj, exportInfo, dupDocRef, fileNamePrefix) {
        for( var i = 0; i < dupObj.artLayers.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.artLayers[i].visible) {
                    continue;
            dupObj.artLayers[i].visible = true;
            var layerName = dupObj.artLayers[i].name;  // store layer name before change doc
            var duppedDocumentTmp = dupDocRef.duplicate();
            if ((png24Index == exportInfo.fileType)||(png8Index == exportInfo.fileType)) { // PSD: Keep transparency
                removeAllInvisible(duppedDocumentTmp);
                //PNGFileOptions
                        if (activeDocument.activeLayer.isBackgroundLayer == false) { //is it anything but a background layer?
                            app.activeDocument.trim(TrimType.TRANSPARENT);
            } else { // just flatten
                duppedDocumentTmp.flatten();
            // Edit
            var docName = app.activeDocument.name;
            // For some reason indexOf fails if we include the '-', so we use 'copy' and decrement the index by 1.
            docName = docName.slice(0, docName.indexOf('copy')-1);
            var fileNameBody = (docName+'_'+layerName).toLowerCase();
            fileNameBody = fileNameBody.replace(/[:\/\\*\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'
            if (fileNameBody.length > 120) {
                fileNameBody = fileNameBody.substring(0,120);
            saveFile(duppedDocumentTmp, fileNameBody, exportInfo);
            duppedDocumentTmp.close(SaveOptions.DONOTSAVECHANGES);
            dupObj.artLayers[i].visible = false;
        for( var i = 0; i < dupObj.layerSets.length; i++) {
            if (exportInfo.visibleOnly) { // visible layer only
                if (!orgObj.layerSets[i].visible) {
                    continue;
            var fileNameBody = fileNamePrefix;
            fileNameBody += "_" + zeroSuppress(i, 4) + "s";
            exportChildren(dupObj.layerSets[i], orgObj.layerSets[i], exportInfo, dupDocRef, fileNameBody);  // recursive call
    // Function: objectToDescriptor
    // Usage: create an ActionDescriptor from a JavaScript Object
    // Input: JavaScript Object (o)
    //        object unique string (s)
    //        Pre process converter (f)
    // Return: ActionDescriptor
    // NOTE: Only boolean, string, number and UnitValue are supported, use a pre processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function objectToDescriptor (o, s, f) {
        o = {};
        var d = new ActionDescriptor;
        var l = o.reflect.properties.length;
        d.putString( app.charIDToTypeID( 'Msge' ), s );
        for (var i = 0; i < l; i++ ) {
            var k = o.reflect.properties[i].toString();
            if (k == "__proto__" || k == "__count__" || k == "__class__" || k == "reflect")
                continue;
            var v = o[ k ];
            k = app.stringIDToTypeID(k);
            switch ( typeof(v) ) {
                case "boolean":
                    d.putBoolean(k, v);
                    break;
                case "string":
                    d.putString(k, v);
                    break;
                case "number":
                    d.putDouble(k, v);
                    break;
                default:
                    if ( v instanceof UnitValue ) {
                        var uc = new Object;
                        uc["px"] = charIDToTypeID("#Rlt"); // unitDistance
                        uc["%"] = charIDToTypeID("#Prc"); // unitPercent
                        d.putUnitDouble(k, uc[v.type], v.value);
                    } else {
                        throw( new Error("Unsupported type in objectToDescriptor " + typeof(v) ) );
        return d;
    // Function: descriptorToObject
    // Usage: update a JavaScript Object from an ActionDescriptor
    // Input: JavaScript Object (o), current object to update (output)
    //        Photoshop ActionDescriptor (d), descriptor to pull new params for object from
    //        object unique string (s)
    //        JavaScript Function (f), post process converter utility to convert
    // Return: Nothing, update is applied to passed in JavaScript Object (o)
    // NOTE: Only boolean, string, number and UnitValue are supported, use a post processor
    //       to convert (f) other types to one of these forms.
    // REUSE: This routine is used in other scripts. Please update those if you
    //        modify. I am not using include or eval statements as I want these
    //        scripts self contained.
    function descriptorToObject (o, d, s, f) {
        var l = d.count;
        if (l) {
            var keyMessage = app.charIDToTypeID( 'Msge' );
            if ( d.hasKey(keyMessage) && ( s != d.getString(keyMessage) )) return;
        for (var i = 0; i < l; i++ ) {
            var k = d.getKey(i); // i + 1 ?
            var t = d.getType(k);
            strk = app.typeIDToStringID(k);
            switch (t) {
                case DescValueType.BOOLEANTYPE:
                    o[strk] = d.getBoolean(k);
                    break;
                case DescValueType.STRINGTYPE:
                    o[strk] = d.getString(k);
                    break;
                case DescValueType.DOUBLETYPE:
                    o[strk] = d.getDouble(k);
                    break;
                case DescValueType.UNITDOUBLE:
                    var uc = new Object;
                    uc[charIDToTypeID("#Rlt")] = "px"; // unitDistance
                    uc[charIDToTypeID("#Prc")] = "%"; // unitPercent
                    uc[charIDToTypeID("#Pxl")] = "px"; // unitPixels
                    var ut = d.getUnitDoubleType(k);
                    var uv = d.getUnitDoubleValue(k);
                    o[strk] = new UnitValue( uv, uc[ut] );
                    break;
                case DescValueType.INTEGERTYPE:
                case DescValueType.ALIASTYPE:
                case DescValueType.CLASSTYPE:
                case DescValueType.ENUMERATEDTYPE:
                case DescValueType.LISTTYPE:
                case DescValueType.OBJECTTYPE:
                case DescValueType.RAWTYPE:
                case DescValueType.REFERENCETYPE:
                default:
                    throw( new Error("Unsupported type in descriptorToObject " + t ) );
        if (undefined != f) {
            o = f(o);
    // Function: preProcessExportInfo
    // Usage: convert Photoshop enums to strings for storage
    // Input: JavaScript Object of my params for this script
    // Return: JavaScript Object with objects converted for storage
    function preProcessExportInfo(o) {
        o.tiffCompression = o.tiffCompression.toString();
        o.pdfEncoding = o.pdfEncoding.toString();
        o.targaDepth = o.targaDepth.toString();
        o.bmpDepth = o.bmpDepth.toString();
        return o;
    // Function: postProcessExportInfo
    // Usage: convert strings from storage to Photoshop enums
    // Input: JavaScript Object of my params in string form
    // Return: JavaScript Object with objects in enum form
    function postProcessExportInfo(o) {
        o.tiffCompression = eval(o.tiffCompression);
        o.pdfEncoding = eval(o.pdfEncoding);
        o.targaDepth = eval(o.targaDepth);
        o.bmpDepth = eval(o.bmpDepth);
        return o;
    // Function: StrToIntWithDefault
    // Usage: convert a string to a number, first stripping all characters
    // Input: string and a default number
    // Return: a number
    function StrToIntWithDefault( s, n ) {
        var onlyNumbers = /[^0-9]/g;
        var t = s.replace( onlyNumbers, "" );
        t = parseInt( t );
        if ( ! isNaN( t ) ) {
            n = t;
        return n;
    // End X2L.jsx

  • Action batch export issue with image trace

    So, currently I'm working on batch processing jpeg sequences using illustrator's image trace and distortion effects. I have batch exported the image traces of the sequences via Adobe bridge.  Now I'm trying to create an action which opens the .ai files containing those image traces, apply a graphic style to the trace, and export a png from that.  I'm banging my head against the wall trying to get this to work right now. If I do the steps (step by step... not using a recorded action) I want on a single file, it works great, but the moment I batch export using the action I've created, it puts the original .png image that the image trace was linked to, on top of the image. The result is a bunch of .png exports that look exactly like my original image sequence.  If I add a "save" function to the action and open the resulting .ai files, I can see that the image trace vectors are in the file. The "linked png" however visible on the layer above those vectors.  Anyone have any idea what I'm doing wrong? How do I get rid of that pesky linked image.
    Also, for anyone who might be thinking that it has something to do with expanding the image trace before applying effects, this issue I'm running into, I've determined, is happening higher up in the hierarchy of the actions... If I simply make an action to open the image trace illustrator file and save it back out, the same issue occurs... placing the .png "linked file" on top of the vector image.
    While I'm at it, I might as well ask if anyone knows how to change the illustrator default image trace preset.... Without being able to change it, or much less specify in the action sequence that I'd like to use a user created image trace preset rather than the default setting, it's greatly overcomplicating my workflow. Makes what could easily be one-step batch processing into two. Seems pretty silly if you ask me.
    Please, if you guys have any insights on this, let me know. It's super frustrating... By the way, if you're wondering what type of effect I'm going for, the idea (as well as some explanation into their own process) starts at 12:44 of this video (http://vimeo.com/77427470).
    THANKS!

    Just wanted to let you guys know, for anyone who might be having my same issue... My home computer, even after a fresh install of Illustrator, was still placing the linked jpeg over the traced vector shapes when batch exporting... I did however find a workaround.  Rather than using Bridge CS6 for the batch image tracing, I used Bridge CS5 to trace in Illustrator CS5. Then, I used Illustrator CS6 to batch export an action that imported and applied an effect to those image traced sequences.  When you do this, it forces you to expand the tracing on import (because of the difference in Illustrator versions I'm assuming).  This way, when you batch run the action, it's already working with expanded vector shapes.  Not sure why this works, but it does.
    Also, I was having some issues getting Illustrator to apply the graphic style when batch exporting. I got it to work by copying an object with that particular graphic style to the clipboard, then adding in the action I was running a "paste" command, followed by a "clear" command.  I can only assume that Illustrator was having issues loading custom graphics styles while batch exporting. The paste/delete technique is annoying, but gets it done.
    Anyways. Just wanted to check in on this one. I'm happy I was able to muscle my way through it all.

  • Problem in Batch Export Report

    Hi all,
    I have developed a report in PP module for Batch exports.
    Here iam providing the input as plant, material no & batch and the output will  be Orderwise material no, batch, mat desc, density and Quantity.
    While executing the report the output is coming exactly for the first order while for the second order the values are not fetching correctly.
    Pls suggest me.
    *& Report  ZPP_EXPORTBATCH
    REPORT  ZPP_EXPORTBATCH.
    TABLES: MSEG,MKPF,AUFK,AFPO. "
    TYPE-POOLS SLIS.
    DATA: IT_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENTS TYPE SLIS_ALV_EVENT,
          IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
          LIST_LAYOUT TYPE SLIS_LAYOUT_ALV,                     "#EC *
          GS_KEYINFO TYPE SLIS_KEYINFO_ALV,                     "#EC *
          W_PROG TYPE SY-REPID,
          P_RS_LINEINFO TYPE SLIS_LINEINFO.
    Internal Tables**********************************
    TYPES: TY_SCLASS TYPE STANDARD TABLE OF SCLASS.
    TYPES: TY_OBJECTDATA TYPE STANDARD TABLE OF CLOBJDAT.
    TYPES: BEGIN OF T_MSEG,
           BWART LIKE MSEG-BWART,
           MATNR LIKE MSEG-MATNR,
           MAKTX LIKE MAKT-MAKTX,
           CHARG LIKE MSEG-CHARG,
           MENGE LIKE MSEG-MENGE,
           ERFME LIKE MSEG-ERFME,
           AUFNR LIKE MSEG-AUFNR,
           AUSP1 LIKE CLOBJDAT-AUSP1,
           ERROR(30),
           END OF T_MSEG.
    TYPES: INT_MSEG_FINAL TYPE STANDARD TABLE OF T_MSEG .
    TYPES: BEGIN OF TY_MENGE1,
             MATNR TYPE MSEG-MATNR,
             CHARG TYPE MSEG-CHARG,
             MENGE TYPE MSEG-MENGE,
             ERFME TYPE MSEG-ERFME,
             MBLNR TYPE MSEG-MBLNR,
             ZEILE TYPE MSEG-ZEILE,
           END OF TY_MENGE1.
    TYPES: TY_MENGE TYPE STANDARD TABLE OF TY_MENGE1.
    DATA : LENGTH     TYPE     I,
    DIFFERENCE     TYPE     I,
    IT_CLASS     TYPE     TY_SCLASS,
    IT_OBJECTDATA     TYPE     TY_OBJECTDATA,
    WA_CLASS     TYPE     SCLASS,
    WA_OBJECTDATA     TYPE     CLOBJDAT,
    L_MATNR     TYPE     MATNR,
    INT_MSEG_FINAL     TYPE     INT_MSEG_FINAL,
    WA_MSEG_FINAL     TYPE     T_MSEG,
    WA_MSEG     TYPE     MSEG,
    WA_WEMNG     TYPE     AFPO-WEMNG,
    WA_PSMNG     TYPE     AFPO-PSMNG,
    WA_AMEIN     TYPE     AFPO-AMEIN,
    BAL_QTY     TYPE     AFPO-WEMNG,
    INT_MSEG_TEMP1     TYPE     INT_MSEG_FINAL,
    WA_CALCULATED1     TYPE     AFPO-WEMNG,
    IT_MENGE     TYPE     TY_MENGE,
    WA_MENGE1     TYPE     TY_MENGE1,
    WA_MAKTX     TYPE     MAKT-MAKTX,
    WA_HSDAT     TYPE     MCH1-HSDAT,
    WA_MAKTX_MAIN     TYPE     MAKT-MAKTX,
    MAIN_DEN     TYPE     STRING,
    DENSITY     TYPE     STRING,
    MDENSITY     TYPE     STRING,
    IDENSITY     TYPE     STRING.
    data : tqty like mseg-menge.
    data:INT_MSEG_TEMP2   LIKE MSEG OCCURS 0 WITH HEADER LINE.
    data:INT_MSEG_TEMP3   LIKE MSEG OCCURS 0 WITH HEADER LINE.
    **************Initialization********************************************
    INITIALIZATION.
    **************Input Parameters List*************************************
      SELECTION-SCREEN SKIP 3.
      SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-T01 . "#EC
          SELECT-OPTIONS : S_WERKS FOR MSEG-WERKS OBLIGATORY, "PLANT
                           S_MATNR FOR MSEG-MATNR OBLIGATORY, "MATERIAL NUMBER
                           S_CHARG FOR MSEG-CHARG,            "BATCH
                           S_BUDAT FOR MKPF-BUDAT.            "POSTING DATE
      SELECTION-SCREEN END OF BLOCK BLOCK1.
    START-OF-SELECTION.
      PERFORM READ_DATA.
      PERFORM SUB_PREPARE_FIELDCATALOG.
      PERFORM FILL_EVENTS_TABLE.
    END-OF-SELECTION.
      PERFORM DISPLAY_DATA_USING_GRID.
    *&      Form  READ_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM READ_DATA .
    DATA :INT_AFPO LIKE AFPO OCCURS 0 WITH HEADER LINE.
    DATA :INT_MSEG        LIKE MSEG OCCURS 0 WITH HEADER LINE,
    INT_MSEG_TEMP   LIKE MSEG OCCURS 0 WITH HEADER LINE.
    SELECT SINGLE MAKTX
      INTO WA_MAKTX_MAIN
      FROM MAKT
      WHERE MATNR IN S_MATNR.
    DATA : WA_MENGE LIKE MSEG-MENGE.
    SELECT  SINGLE *
    FROM  AFPO
    INTO  INT_AFPO
    WHERE MATNR IN S_MATNR
    AND   CHARG IN S_CHARG
    AND   DWERK IN S_WERKS.
    MOVE INT_AFPO-WEMNG TO WA_WEMNG.
    MOVE INT_AFPO-PSMNG TO WA_PSMNG.
    MOVE INT_AFPO-AMEIN TO WA_AMEIN.
    SELECT *
    INTO TABLE INT_MSEG
    FROM  MSEG
    WHERE AUFNR = INT_AFPO-AUFNR
    AND  BWART IN ('261' , '262' )
    AND  WERKS IN S_WERKS.
    REFRESH INT_AFPO.
    int_mseg_temp3[] = int_mseg[].
    LOOP AT INT_MSEG.
      clear tqty.
        loop at int_mseg_temp3 WHERE MATNR = INT_MSEG-MATNR
                                 and charg = int_mseg-charg
                                 AND AUFNR = INT_MSEG-AUFNR
              if int_mseg_temp3-bwart = '261' .
                   tqty = tqty + int_mseg_temp3-menge.
              elseif int_mseg_temp3-bwart = '262'.
                   tqty = tqty - int_mseg_temp3-menge.
              endif.
         endloop.
        int_mseg-menge = tqty.
      SELECT  SINGLE *
      FROM  AFPO
      INTO  INT_AFPO
      WHERE MATNR = INT_MSEG-MATNR
      AND   CHARG = INT_MSEG-CHARG
      AND   DWERK IN S_WERKS.
    IF SY-SUBRC EQ 0 AND INT_AFPO-AUFNR <> ' '.
        SELECT * FROM MSEG
        INTO    TABLE INT_MSEG_TEMP
        WHERE  AUFNR = INT_AFPO-AUFNR
        AND    BWART IN ('261' , '262' )
        AND    WERKS IN S_WERKS.
        LOOP AT INT_MSEG_TEMP.
          WA_CALCULATED1 = ( INT_MSEG_TEMP-MENGE / INT_AFPO-WEMNG ) * INT_MSEG-MENGE.
          WA_MENGE1-MENGE = WA_CALCULATED1.
          WA_MENGE1-MATNR = INT_MSEG_TEMP-MATNR.
          WA_MENGE1-CHARG = INT_MSEG_TEMP-CHARG.
          WA_MENGE1-ERFME = INT_MSEG_TEMP-ERFME.
          WA_MENGE1-MBLNR = INT_MSEG_TEMP-MBLNR.
          WA_MENGE1-ZEILE = INT_MSEG_TEMP-ZEILE.
          APPEND WA_MENGE1 TO IT_MENGE.
          CLEAR: WA_CALCULATED1, WA_MENGE1.
        ENDLOOP.
        SORT IT_MENGE BY MBLNR ZEILE MATNR CHARG.
         ENDLOOP.
        CLEAR  INT_MSEG.
        MODIFY  TABLE INT_MSEG  FROM INT_MSEG_TEMP.
        LOOP AT INT_MSEG_TEMP.
          MOVE-CORRESPONDING INT_MSEG_TEMP TO INT_MSEG.
          READ TABLE IT_MENGE INTO WA_MENGE1
          WITH KEY MATNR = INT_MSEG_TEMP-MATNR
                   CHARG = INT_MSEG_TEMP-CHARG
                   MBLNR = INT_MSEG_TEMP-MBLNR
                   ZEILE = INT_MSEG_TEMP-ZEILE.
          INT_MSEG-MENGE = WA_MENGE1-MENGE.
          APPEND INT_MSEG.
          CLEAR  INT_MSEG.
    *Added for Changes given by anup ART:09MAR08
         CLEAR WA_MENGE1-MENGE.
    *End of for Changes given by anup ART:09MAR08
        ENDLOOP.
        REFRESH INT_MSEG_TEMP.
        CLEAR INT_AFPO.
      ELSE.
       MOVE:  INT_MSEG-MATNR TO   WA_MSEG_FINAL-MATNR,
        INT_MSEG-CHARG  TO WA_MSEG_FINAL-CHARG,
        INT_MSEG-MENGE  TO WA_MSEG_FINAL-MENGE,
        INT_MSEG-ERFME  TO WA_MSEG_FINAL-ERFME,
        INT_MSEG-BWART  TO WA_MSEG_FINAL-BWART .
        APPEND WA_MSEG_FINAL TO INT_MSEG_FINAL.
        CLEAR WA_MSEG_FINAL.
        CLEAR INT_AFPO.
      ENDIF.
    ENDLOOP.
    INT_MSEG_TEMP1[] = INT_MSEG_FINAL[].
    REFRESH INT_MSEG_FINAL.
    SORT INT_MSEG_TEMP1 BY MATNR CHARG.
    LOOP AT INT_MSEG_TEMP1 INTO WA_MSEG_FINAL.
      ON CHANGE OF WA_MSEG_FINAL-MATNR
      OR WA_MSEG_FINAL-CHARG.
        IF WA_MSEG_FINAL-BWART = '261'.
          WA_MENGE = WA_MENGE + WA_MSEG_FINAL-MENGE.
        ELSEIF WA_MSEG_FINAL-BWART = '262'.
          WA_MENGE = WA_MENGE - WA_MSEG_FINAL-MENGE.
        ENDIF.
        WA_MSEG_FINAL-MENGE = WA_MENGE.
        CLEAR WA_MENGE.
        APPEND WA_MSEG_FINAL TO INT_MSEG_FINAL.
        CLEAR WA_MSEG_FINAL.
      ENDON.
    ENDLOOP.
    LOOP AT INT_MSEG_FINAL INTO WA_MSEG_FINAL.
      SELECT SINGLE MAKTX
        INTO WA_MAKTX
        FROM MAKT
        WHERE MATNR = WA_MSEG_FINAL-MATNR.
      WA_MSEG_FINAL-MAKTX = WA_MAKTX.
      MODIFY INT_MSEG_FINAL FROM WA_MSEG_FINAL TRANSPORTING MAKTX.
      CLEAR WA_MAKTX.
    ****************CHGS BY MURALI.C FOR
    DATA: WA_OBJECT(50) TYPE C.
    LENGTH = STRLEN( WA_MSEG_FINAL-MATNR ).
    IF LENGTH LT 18.
    DIFFERENCE = 18 - LENGTH.
    DO DIFFERENCE TIMES.
    CONCATENATE WA_MSEG_FINAL-MATNR SPACE INTO L_MATNR.
    ENDDO.
    ENDIF.
    CONCATENATE L_MATNR WA_MSEG_FINAL-CHARG INTO WA_OBJECT RESPECTING
    BLANKS.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
    EXPORTING
      CLASS                      = ' '
      CLASSTEXT                  = 'X'
    CLASSTYPE                  = '023'
      CLINT                      = 0
      FEATURES                   = 'X'
      LANGUAGE                   = SY-LANGU
    OBJECT                     = WA_OBJECT
    OBJECTTABLE                = 'MCH1'
      KEY_DATE                   = SY-DATUM
      INITIAL_CHARACT            = 'X'
      NO_VALUE_DESCRIPT          = NO_VALUE_DESCRIPT
      CHANGE_SERVICE_CLF         = 'X'
      INHERITED_CHAR             = ' '
      CHANGE_NUMBER              = ' '
    TABLES
    T_CLASS                    = IT_CLASS
    T_OBJECTDATA               = IT_OBJECTDATA
      I_SEL_CHARACTERISTIC       = I_SEL_CHARACTERISTIC
      T_NO_AUTH_CHARACT          = T_NO_AUTH_CHARACT
    EXCEPTIONS
    NO_CLASSIFICATION          = 1
    NO_CLASSTYPES              = 2
    INVALID_CLASS_TYPE         = 3
    OTHERS                     = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    read TABLE IT_OBJECTDATA INTO wa_objectdata
    with KEY SMBEZ = 'Density'.
    if wa_objectdata-ausp1 <> '?'.
    perform density_calc using wa_objectdata-ausp1 changing idensity.
    WA_MSEG_FINAL-AUSP1 = idensity.
    else.
    WA_MSEG_FINAL-ERROR = 'classification value missing'.
    endif.
    MODIFY INT_MSEG_FINAL FROM WA_MSEG_FINAL TRANSPORTING AUSP1 ERROR.
    CLEAR :WA_MSEG_FINAL-MATNR,WA_MSEG_FINAL-CHARG,WA_MSEG_FINAL-AUSP1,WA_OBJECT,WA_OBJECTDATA-AUSP1.
    ENDLOOP.
    ENDFORM.                    " READ_DATA
    *&      Form  SUB_PREPARE_FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_PREPARE_FIELDCATALOG .
      X_FIELDCAT-FIELDNAME = 'MATNR'.
      X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
      X_FIELDCAT-SELTEXT_M = 'MATERIAL NUMBER'. "#EC NOTEXT
      X_FIELDCAT-JUST = 'C'.
      X_FIELDCAT-OUTPUTLEN = 10.
      X_FIELDCAT-KEY = 'X'.
      X_FIELDCAT-KEY_SEL = 'X'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'MAKTX'.
      X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
      X_FIELDCAT-SELTEXT_M = 'MATERIAL DESCRIPTION'. "#EC NOTEXT
      X_FIELDCAT-JUST = 'C'.
      X_FIELDCAT-OUTPUTLEN = 17.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'CHARG'.
      X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
      X_FIELDCAT-SELTEXT_M = 'BATCH'. "#EC NOTEXT
      X_FIELDCAT-JUST = 'C'.
      X_FIELDCAT-OUTPUTLEN = 10.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'AUSP1'.
      X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
      X_FIELDCAT-SELTEXT_M = 'DENSITY'. "#EC NOTEXT
      X_FIELDCAT-JUST = 'C'.
      X_FIELDCAT-OUTPUTLEN = 6.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'MENGE'.
      X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
      X_FIELDCAT-SELTEXT_M = 'QUANTITY'. "#EC NOTEXT
      X_FIELDCAT-JUST = 'C'.
      X_FIELDCAT-OUTPUTLEN = 9.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'ERFME'.
      X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
      X_FIELDCAT-SELTEXT_M = 'UOM'. "#EC NOTEXT
      X_FIELDCAT-JUST = 'C'.
      X_FIELDCAT-OUTPUTLEN = 9.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
    *X_FIELDCAT-FIELDNAME = 'EDATU1'.
    X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
    X_FIELDCAT-SELTEXT_M = 'CONFIRMED QUANTITY DATED'. "#EC NOTEXT
    X_FIELDCAT-JUST = 'C'.
    X_FIELDCAT-OUTPUTLEN = 9.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'ETENR1'.
    X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
    X_FIELDCAT-SELTEXT_M = 'CONFIRM SL NO'. "#EC NOTEXT
    X_FIELDCAT-JUST = 'C'.
    X_FIELDCAT-OUTPUTLEN = 9.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'LFIMG'.
    X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
    X_FIELDCAT-SELTEXT_M = 'DELIVERED QUANTITY'. "#EC NOTEXT
    X_FIELDCAT-JUST = 'C'.
    X_FIELDCAT-OUTPUTLEN = 18.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'ERDAT'.
    X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
    X_FIELDCAT-SELTEXT_M = 'DELIVERED DATE'. "#EC NOTEXT
    X_FIELDCAT-JUST = 'C'.
    X_FIELDCAT-OUTPUTLEN = 18.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    ENDFORM.                    " SUB_PREPARE_FIELDCATALOG
    *&      Form  FILL_EVENTS_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM FILL_EVENTS_TABLE .
       WA_EVENTS-NAME = 'TOP_OF_PAGE'.
       WA_EVENTS-FORM = 'PRINT_HEADING'.
       APPEND WA_EVENTS TO IT_EVENTS.
    ENDFORM.                    " FILL_EVENTS_TABLE
    FORM PRINT_HEADING. "#EC CALLED
      DATA IT_HEADINGS TYPE SLIS_T_LISTHEADER.
      DATA WA_HEADINGS LIKE LINE OF IT_HEADINGS.
      CLEAR WA_HEADINGS.
      WA_HEADINGS-TYP = 'H'.
      WA_HEADINGS-INFO = '                                          '.
      WA_HEADINGS-TYP = 'H'.
      WA_HEADINGS-INFO = ' BATCH EXPORT DETAILS REPORT '.
      APPEND WA_HEADINGS TO IT_HEADINGS.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_HEADINGS
          I_LOGO                   =  'APARLOGO' .
    ENDFORM.                    "PRINT_HEADING
    *&      Form  DISPLAY_DATA_USING_GRID
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_DATA_USING_GRID .
       CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_BYPASSING_BUFFER                = 'X'
       I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = SY-CPROG
       IT_FIELDCAT                       = IT_FIELDCAT
       I_SAVE                            = 'A'
       IT_EVENTS                         = IT_EVENTS
       TABLES
       T_OUTTAB                          = INT_MSEG_FINAL
      IF SY-SUBRC <> 0. "#EC *
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_DATA_USING_GRID
    *&      Form  density_calc
          text
         -->P_WA_OBJECTDATA_AUSP1  text
         <--P_IDENSITY  text
    FORM density_calc  USING    WA_OBJECTDATA_AUSP1
                       CHANGING DENSITY.
    data: den type float,density1(8).
    density1(8) = wa_objectdata-ausp1.
    call function 'CHAR_FLTP_CONVERSION'
    exporting
      DYFLD                    = ' '
      MASKN                    = ' '
      MAXDEC                   = '16'
      MAXEXP                   = '59+'
      MINEXP                   = '60-'
    string                   = density1
      MSGTYP_DECIM             = 'W'
    importing
      DECIM                    =
      EXPON                    =
    flstr                    = den
      IVALU                    =
    EXCEPTIONS
      EXPONENT_TOO_BIG         = 1
      EXPONENT_TOO_SMALL       = 2
      STRING_NOT_FLTP          = 3
      TOO_MANY_DECIM           = 4
      OTHERS                   = 5
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    if den gt 0.
    density = 1 / den.
    density = density(5).
    density = density / 10.
    den = strlen( density ).
    if den ge 6.
      density = density(6).
      clear: den.
      den = strlen( density ).
    elseif den lt 6.
       density = density.
       clear: den.
       den = strlen( density ).
    endif.
    else.
    density = '0.000'.
    endif.
    den = strlen( density ).
    data: den3(5) type c.
    if den gt 3.
      case den.
        when '6'.
                  clear: den3.
                  compute den3 = 10000 * ( density(6) - density(5) ).
                  if den3 between 6 and 9.
                    clear: den3.
                    compute den3(2) = 10000 * ( density(5) - density(4) ).
                    compute den3 = den3(1) + 1.
                    compute den3 = den3 / 1000.
                    compute density = density(4) + den3.
                  endif.
        when '5'.
                  clear: den3.
                  compute den3 = 1000 * ( density(5) - density(4) ).
                  if den3 between 6 and 9.
                    clear: den3.
                    compute den3(2) = 1000 * ( density(4) - density(3) ).
                    compute den3 = den3(1) + 1.
                    compute den3 = den3 / 100.
                    compute density = density(3) + den3.
                  endif.
      endcase.
    endif.
    density = density(5).
    ENDFORM.                    " density_calc

    Hello,
    I haven't checked the code but from the symptom you describe it could be possible that some fields used to calculate valeus are not getting cleared between calculations.  This could result in some values from order the first order one being used in the calculation for values in the second order.
    Regards,
    Steve.

  • Iphoto 11 9.4.2 won't export slideshow

    This is what I get when I try to export a slideshow.
    I have a Mac Book Pro 13 running 10.8.2
    I have exported several slide shows before with my old white Mac Book.
    I tried exporting slideshows with only 2 pictures, and still no luck.
    Any ideas? thank you for your help in advance.

    Hello,
    OT, so I tried to log in with a different account, and when I tried to import pictures to iphoto, I kept getting an error about a problem with the Flip4Mac plugin. I removed the Flip4Mac plugin and now I can export slideshows again. Kind of weird but it works, so now when I need Flip4Mac I just install it and uninstall it as needed.
    Thanks for your patience and all the ideas OT, and Jose Luis, if you have Flip4Mac this might solve your problem, or it might be some other external plugin! Good Luck and thanks!

Maybe you are looking for

  • SC 3.2 nodes reboot when i reboot the first one

    i had create a cluster with two nodes and quorom (shared file system) beetwen the two nodes. but when i try to reboot one node the second one reboot. i had solaris 10 and sun cluster 3.2. the error in the console is WARNING: /scsi_vhci/ssd@g600a0b800

  • (Urgent) Dynamic Table Name

    Hi Fellows, Can I use dynamic table name in a loop? I have a problem that I want to use variable table in a cursor for example procedure check_rows as cursor c1 is select view_name from user_views; v_count number; v_view_name varchar2(35); begin for

  • Leave screen?

    How can I return back? If I press the button the program says nothing. And I cann't go back. Thanks! TABLES sscrfields. SELECTION-SCREEN PUSHBUTTON /10(20) btn1 USER-COMMAND bnt1. INITIALIZATION.   MOVE 'Here!!! TO btn1. AT SELECTION-SCREEN.   IF ssc

  • Re-download purchased LP

    Hello everyone...I tried searching for an answer but couldn't find anything... I recently bought and album that included an iTunes LP...long story short I lost the whole album in a data transfer...I re-downloaded the album no problem from itunes but

  • EDM Calculation WB

    Hi Gurus, I am facing a peculiar issue with EEDMCALCWB for Formula calculations. Profile A = Profile 1 + Profile 2. Values maintained in Profile 1 & 2 are from 00:00:00 to 23:59:59 hrs (15 min interval). When I execute the Calculation WB. The values