Does InDesign have a CLI? Batch processing projects

Hello all,
I think I already know the answer but I thought I'd ask anyway.
A little background...
When I push my MadCap Flare source to our source control, we have a buildbot that automatically runs a shell script that compiles/publishes my Flare source (via Flare CLI compatible MadBuild) to pushes it to a latest build server.
Now I have a documentation project that is impossible to build in Flare, so I must use Indesign (it is a poster-style quick start guide). I am hoping that InDesign has a similar feature where I can push the InDesign source to our source control server and have the buildbot automatically publish via a shell script.
All I need is an InDesign batch file method (via Command Line Interface) of publishing. Is this possible? If so, someone please point me to instructions on how to use the command line options.
NOTES:
- I found some information about Indesignserver for CS3 but my installation only has "InDesignServerService.exe.metagen" - no other similarly named files.
- I am using Adobe Indesign CC CS6
Thanks!

InDesign can run startup scripts that you can build with Extendscript (comes with InDesign.) It might be possible to dedicate an InDesign installation to start up with a dedicated script that performs what you need, when your source-control application launches InDesign.
Another possibility might be to have an InDesign script periodically look for a file in a location and when it finds it, perform operations on that file. The source-control application would put the file for InDesign to find.
These are technically called "wild guesses" at solutions. You sound tech-enough to go further.
However, read the InDesign license agreement to see if this is permissible use. Some applications don't permit using a single-user installation as a service for other users.
[EDIT] I forgot to mention that InDesign does have some XML smarts. Depending on your needs, it might be possible to output InDesign documents and/or templates in XML form, and process them with an XML processor that does run from a CLI. Worth a look, anyway. Also, look up the book XML for InDesign by James Maivald. You might find useful info in it.[/EDIT]
HTH
Regards,
Peter
Peter Gold
KnowHow ProServices   
Message was edited by: peter at knowhowpro

Similar Messages

  • Participant 'userx' does not have role assignments in process '/ProcessP

    I am using Oracle BPM 10.3 MP2 Enterprise Edition
    Version: 10.3.2
    Build: #100486
    Have a process ProcessP and role RoleR.
    User 'userx' is assigned to role 'RoleR', when he tries logging into the workspace,
    getting exception message in page as below:
    "Participant 'userx' does not have role assignments in process '/ProcessP#Default-1.0'. This error usually takes place when the Process Execution Engine has not re-synchronized with the Directory Service. Try re-logging and executing the task again. If the problem persists, contact your Administrator"
    Tried deleting the user 'userx' from process admin and re-creating the user and gave role 'RoleR' but still the issue persists.
    This is working for other user 'usera', 'userb', 'userc' etc.
    Any suggestions.
    Thanks in Advance.

    Is restart of the engine server on which ProcessP deployed is the only solution since the error messages shows up as 'Process Execution Engine has not re-synchronized with the Directory Service. '

  • Can we have a Real batch process

    The current batch process functionality in Audition records not keystrokes, but settings; so if you record a process using the ClickPop Eliminator functionality under Restoration, you get whatever settings you used with the sound sample you used during the script recording.  However, if you want to record a script that uses the very powerful Auto Find All Levels feature of the Click/Pop functionality, you're out of luck (as far as I know).
    I'm in the process of cleaning up a bunch of old recordings I have and digitizing them.  I can't use the click/pop setting of one for the others!  They're just too different, so I've been spending hours waiting while the system samples the current audio and applies the click/pop settings.  Can we get a true automation system that let's me record the fact that I want the system to run the Auto Find, then use the results to run the Click/pop eliminator.  I could then process hundreds of files while I sleep instead of having to check my computer screen every five minutes and get the next step of the process running!
    There are other products with better automation, but they don't do as good a job to reduce noise and eliminate clicks and pops on a wide variety of audio as Audition does.  But if you know some that does, please let me know!

    Map data with the standard iPhone Maps application is not stored locally on the iPhone. An internet connection is required to download maps data with the Maps application, which would not be effective with a turn by turn voice direction GPS navigation app. Maps data with a standalone GPS navigation device is stored locally on the device.

  • Does InDesign have Shared Content Like Quark?

    We soon will be working on our new catalog that was originally done in Quark. When I and the other designer did this catalog we used Content Sharing in Quark to do the catalog. We had the catalog stored on a server drive that we both could access. This eliminated much of the catalog being tossed back and forth between us to do work on and kept the document clean and up-to-date.
    We are now going to switch it over to InDesign. We both use CS3 on a Mac (I also use a PC) and want to use this same type of document sharing in InDesign. Is InCopy the way to go? Is this the same as Content Sharing in Quark? We also did the product graphs using Content Sharing which worked out great. Is this possible in InDesign?
    I will be using Q2ID Quark to Adobe plug-in to convert the Quark document ti InDesign. I have used this plug-in for one or two page flyers, but not for a large document like our 128-page catalog. Is there anything I need to know when converting the catalog over? Our catalog consists of images, product graphs (done as text not tables) and style sheets.
    Thanks everyone for your answers.

    Not really sure what content sharing is in Quark, but yes, it sounds like InCopy would be a good solution for you.
    Q2ID is an excellent product and does a great job of converting ID files, but as the old saying goes, GIGO.
    Bob

  • Does somebody have experience to manage SAP project with solution manager?

    Hi friends,
    I will implement new project for my client. As I know, solution manager is already part of SAP Netweaver. To install SAP NetWeaver, solution manager must be installed. Meanwhile, solution manager provides a project management tool, for example, the business process definition, blueprint...
    But I never use it to manage project. Could somebody share experience in this area?
    Regards,
    Watson

    Hi Ragu,
    Thanks for your posting. I will implement a SAP APO project. What I need is the methods to use solution manager, for example, configuration manual, step by step guide. I'm also interested in the advantages of SAP solution manager.
    Regards,
    Watson

  • Does Indesign have a text line tool?

    I am thinking of moving to Indesign from quark, and I have been trying to find the equivalent to quarks text line tool, is this available?
    Thx
    Brad

    Hi Rodney
    Thankyou for your promt reply, I have since found the line tool and with the type in a path tool it seemed to work OK, the only difference I found was you cannot grab the handles on the line path and control it's length or angles after the fact? I had to use the propery manager.
    Thank you again for your time
    Brad

  • Does Indesign have a Split to Grid feature like Illustrator does?

    Hi, I'm trying to split a rectangle into several boxes w the exact same dimensions. I can easily do this in Illustrator using Path>Split into Grid. How can I do the same thing in Indesign CS3?

    You might get what you want by dragging ruler guides into approximate positions, being sure that the outside ones are snapped to the rectangle edges. Select all of the horizontal or all of the vertical guides at once, then open the align panel and use the distribute objects options to space them evenly. Be sure you have "Align to selection" chosen in the drop-down.
    Peter

  • Does InDesign have any security features that can be used in a design?

    Our client would like us to create some certificiates which are to be printed using holograms, guilloche and security design patterns, micro text, etc, etc.  I'm of the understanding that this is a specialist field and we would need specific software are there any plugins available for InDesign?

    It's specialised printing equipment.
    You should source your printers first and talk to them about any concerns and design requirements.

  • Batch process does not work in one service, but worked in another.

    Hi Fellows,
    We have here a batch process with a code encrypted, that runs daily in a production environment.
    Tonight this batch process did not work.
    It is expected that this process runs in about 20 seconds, but tonight this process used about 3 hours and did not finished.
    We checked if it was concurrency, killed some sessions and tried again, and nothing has changed.
    And then someone changed the service that this process uses, it was 'bat' and changed to 'dba'. And it worked succesfully in 11 seconds.
    Here is the tnsnames that the batch process uses:
    bat =
    (DESCRIPTION =
    (LOAD_BALANCE = OFF)
    (FAILOVER=ON)
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x2)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x3)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = bat)
    (FAILOVER_MODE =
    (BACKUP = dba)
    (TYPE = NONE)
    (METHOD = BASIC)
    (RETRIES = 20)
    (DELAY = 5)
    dba =
    (DESCRIPTION =
    (LOAD_BALANCE = OFF)
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x2)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x3)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dba)
    Do you guys know what could be the reason?
    Thanks in advance.

    We set the service which the app should connect.
    These services are set in srvctl:
    ora.cms.bat.cms1.srv ONLINE ONLINE on fastora1
    ora.cms.bat.cms2.srv ONLINE ONLINE on fastora2
    ora.cms.bat.cms3.srv ONLINE ONLINE on fastora3
    ora.cms.bat.cs ONLINE ONLINE on fastora1
    ora.cms.cms1.inst ONLINE ONLINE on fastora1
    ora.cms.cms2.inst ONLINE ONLINE on fastora2
    ora.cms.cms3.inst ONLINE ONLINE on fastora3
    ora.cms.cmsuser.cms1.srv ONLINE ONLINE on fastora1
    ora.cms.cmsuser.cms3.srv ONLINE ONLINE on fastora3
    ora.cms.cmsuser.cs ONLINE ONLINE on fastora1
    ora.cms.db ONLINE ONLINE on fastora1
    ora.cms.dba.cms1.srv ONLINE ONLINE on fastora1
    ora.cms.dba.cms2.srv ONLINE ONLINE on fastora2
    ora.cms.dba.cms3.srv ONLINE ONLINE on fastora3
    The batch process connects to a service [ bat ], but it hangs and don't finish. But when we change the service do dba is just pass in some seconds and finish succesfully.
    Connected to DB [issr@bat  ]
    PAYware CMS Version 8.0 - Module : E352 Release : 000000002
    Program: /cms/cmsissr/CMS/bin/issuer/mepcs352
    Release: 2
    PARAMETERS OK !!!
    NUMBER OF PROC.: 000001
    Number of transactions : +000047570
    Number of parallel processes: 000001
    Transactions by process: 000000000000047570
    Transactions Processed: 000010000

  • SAP R/3 vs XI Batch Processing

    We are planning to move some of our existing interfaces between legacy systems & R/3 to be processed through XI. We would like to do this in such a manner that the business doesn't get impacted much and also keeping the project costs to minimum.
    Current interfaces use batch processing in R/3 with 1000's of records sitting in a file ftp'd from legacy system and a pre-edit ABAP program will validate the data and posts transactions in R/3 using BDC sessions. Errors will be reported through some custom application built in ABAP. Users will process the BDC session and correct the errors to post the documents. In some cases we use BAPI's but when the BAPI errors out a BDC session is created for processing the errors.
    We are on XI3.0 SP12 & R/3 4.6B
    Can XI do all the stuff that R/3 does today in terms of batch processing and error correction by business user etc. What are the limitations and are there any workarounds to overcome them.

    XI is not meant for that and cannot do that. XI is an integration engine and does not replace R/3 work.
    What it means: XI can receive data and modify the data in mapping and deliver it to another system and invoke a process in case of R/3.
    XI has 3 adapters for other SAP systems.
    1. IDoc
    2. RFC
    3. XI Proxy
    4. File Adapter (I dont think you want to create a file again, but one of my previous client used this option)
    I guess you know about the first 2.
    The third one is, when you receive the data from source system, modify it according to the requirements and pass it to an ABAP Class where you can write your own code.
    Let me simplify this for your process.
    When a file is received, XI can pick up the file and send it to R/3 System using XI proxy (in internal tables or structures) which will be executing a class. Within that class you can code to pass that data to your ABAP program with SUBMIT PROGRAM. This is just an example.
    This cannot replace your BDC process, but can make it to do the same.
    regards
    Shravan

  • Acrobat 9 Standard batch processing

    Does Acrobat 9 Standard support batch processing of multipage tiffs? (I want them to have the OCR ability.) I read that you can do it in Acrobat 7 and 8 Pro.

    Thank you.

  • Batch processing files

    my question might come a something simple to most of you, but it has stumped me so far.
    i have ~1900 files that i need to run PDF Optimize on and have them set to Low Resolution. i have created a batch process in acrobat to do this, but there is one thing that is holding up this process: i have crop and trim marks on the original files. i need to make these files exactly Letter size and remove the crop and trim marks, but so far, i have not been able to figure out how to remove them.
    unfortunately, i need the originals to keep the crop & trim marks for a client of mine, but the low resolution pdfs need to be page size only. and i really don't feel llike sitting here while indesign runs through another ~1900 files to make low res pdfs; thats just silly.
    so any and all help that you masters of acrobat could help me with would be appreciated. thanks.

    Check out Switch:
    http://www.nch.com.au/switch/

  • Batch process 1000 images.

    I have a batch of 1000 images that all need to be processed with the exact same levels adjustments and the exact same crop command. I recorded the necssary actions in photoshop, and I can now open up approximately 20 of my images and batch apply the actions to all 20 images automatically. The trouble is that I have 1000 images to process like this, and I can't open all 1000 in photoshop at once; it just kills my machine. I don't want to do the whole 1000 in little batches of 20 either. I'll be getting a new pile of 1000 images to process like this every day or two, so I need a way to do the whole 1000 automatically without user intervention.
    Is such a thing possible?
    I'm a software develoeper by profession, so if doing this sort of massive batch processing requires any command line work or scripting then I would totally be up for that.
    Many thanks,
    -Patrick

    I think the work's already been done for you.
    Check out File - Scripts - Image Processor.  I think it's in that submenu (can't check at this moment, my Photoshop's busy with a 3D render).  If it's not there, look in File - Automate.
    -Noel

  • Batch process RAW exposures, please help!

    Hello, I'm new to photoshop scripting for windows, and I was wondering if anyone knew how to batch process a folder of raw files, change the the raw's exposure, and save as jpg to another folder, based on a condition within the file's name, then close the opended jpg  document.
    My goal is to have a script that extracts the correct exposures from sets of three bracketed raw files, which I usually have seperated by 2 EV's.  So for example, say I have a folder Called Batch Processing on the C drive, and I have two folders,
    C:\Batch Processing\JPG
    C:\Batch Processing\RAW
    and in the RAW folder I have some files called,
    Image_01_E01.cr2
    Image_01_E02.cr2
    Image_01_E03.cr2
    If the file has "_E01" at the end, I want to open that raw file, change the exposure to -4, save the file with the same name, except the last 4 characters, and add some number to the end, so for example, it would end up being "Image_01" + "_E01".  This would end up being saved to the JPG folder. Then open up the same file, change the exposure to -2 and save as "Image_01" + "_E02".
    To make this post short, here is the conversion table I'm trying to achieve -
    Image_01_E01.cr2 -> Image_01_E01.jpg Exposure = -4
    Image_01_E01.cr2 -> Image_01_E02.jpg Exposure = -2
    Image_01_E02.cr2 -> Image_01_E03.jpg Exposure = -2
    Image_01_E02.cr2 -> Image_01_E04.jpg Exposure = 0
    Image_01_E02.cr2 -> Image_01_E05.jpg Exposure = 2
    Image_01_E03.cr2 -> Image_01_E06.jpg Exposure = 2
    Image_01_E03.cr2 -> Image_01_E07.jpg Exposure = 4
    After that, close all open files. Then, if there is another set of raws, repeat for them as well. For example -
    Image_02_E01.cr2 -> Image_02_E01.jpg Exposure = -4
    Image_02_E01.cr2 -> Image_02_E02.jpg Exposure = -2
    Image_02_E02.cr2 -> Image_02_E03.jpg Exposure = -2
    Image_02_E02.cr2 -> Image_02_E04.jpg Exposure = 0
    Image_02_E02.cr2 -> Image_02_E05.jpg Exposure = 2
    Image_02_E03.cr2 -> Image_02_E06.jpg Exposure = 2
    Image_02_E03.cr2 -> Image_02_E07.jpg Exposure = 4
    So basically this script would take 3 raws seperated by 2 EV's and extract 7 exposures, seperated by 2 EV's.  I've done this manually, and merged them to hdr, and the results are actually pretty decent. 
    I tried doing this with actions and batch processing, but I had to have everything seperated in individual folders like E01, E02, etc. and I had to make an action for each step in the process.
    I know this is probably a lot to ask, but I think it can be done, and I would of course credit the person in the script for helping.
    Thanks in advance!

    I think I was able to make a function to get the exposure time from the raw's xmp file. So the xmp file has to already be saved with the exposure time in the exif section.
    function getEV(thumb){
        var Name = decodeURI(thumb.name).replace(/\.[^\.]+$/, '');
        var file = new File(thumb.path + "/" + Name + ".xmp");
        try{
            if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
            if(file.exists){
                file.open('r');
                file.encoding = "UTF8";
                file.lineFeed = "unix";
                file.open("r", "TEXT", "????");
                var xmpStr = file.read();
                file.close();
            }else{
                var xmpStr='';
            var xmp = new XMPMeta( xmpStr );
            var exposureTime = xmp.getProperty(XMPConst.NS_EXIF, 'ExposureTime');
            if(exposureTime  == undefined) exposureTime = 1;
        }catch(e){alert(e+"-"+e.line);}
        return exposureTime;
    I was able to use the ui you put together from your hdr script, and used the functions from your cr2 script, to make the raw converter script. I've added a drop down list for the different conversion, and I added an option to either enter the exposure time for the middle exposure, or use the xmp's exposure time instead. So far I've only added a straight conversion method, where the files are converted, without any modifications, the 3 raw, and 5 raw conversion methods. Here's the script -
    #target photoshop
    app.bringToFront();
    main();
    function main(){
        Prefs = {};
        try{
            var desc1 = app.getCustomOptions('0bafbed0-0bc7-11e1-be50-0800200c9a66');
            Prefs = eval(desc1.getString(0));
        }catch(e){
            Prefs.folder1 = Folder("~/desktop");
            Prefs.folder2 = Folder("~/desktop");
            Prefs.bits = false;
        var win = new Window( 'dialog', 'RAW Converter' );
        g = win.graphics;
        var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.91, 0.91, 0.91, 1]);
        g.backgroundColor = myBrush;
        win.orientation = 'row';
        win.p1 = win.add("panel", undefined, undefined, {borderStyle:"etched"});
        win.g1 = win.p1.add('group');
        win.g1.orientation = "row";
        win.title = win.g1.add('statictext',undefined,'RAW to JPEG Converter');
        win.title.alignment = "fill";
        var g = win.title.graphics;
        g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
        win.g5 = win.p1.add('group');
        win.g5.orientation = "row";
        win.g5.alignment = 'left';
        win.g5.spacing = 10;
        win.g5.st1 = win.g5.add('statictext',undefined,'Please select input folder');
        win.g10 = win.p1.add('group');
        win.g10.orientation = "row";
        win.g10.alignment = 'left';
        win.g10.spacing = 10;
        win.g10.et1 = win.g10.add('edittext');
        win.g10.et1.preferredSize = [400,20];
        win.g10.et1.enabled = false;
        win.g10.bu1 = win.g10.add('button',undefined,'Browse');
        win.g10.bu1.onClick = function() {
            InputFolder = Folder.selectDialog("Input folder",Prefs.folder1);
            if(InputFolder != null){
                win.g10.et1.text = decodeURI(InputFolder.fsName);
                processHDRList();
        win.g15 = win.p1.add('group');
        win.g15.orientation = "row";
        win.g15.alignment = 'left';
        win.g15.spacing = 10;
        win.g15.st1 = win.g15.add('statictext',undefined,'Please select output folder');
        win.g20 = win.p1.add('group');
        win.g20.orientation = "row";
        win.g20.alignment = 'left';
        win.g20.spacing = 10;
        win.g20.et1 = win.g20.add('edittext');
        win.g20.et1.preferredSize = [400,20];
        win.g20.et1.enabled = false;
        win.g20.bu1 = win.g20.add('button',undefined,'Browse');
        win.g20.bu1.onClick = function() {
            OutputFolder = Folder.selectDialog("Output folder",Prefs.folder2);
            if(OutputFolder != null){
                win.g20.et1.text = decodeURI(OutputFolder.fsName);
        win.g30 = win.p1.add('group');
        win.g30.orientation = "row";
        win.g30.alignment = 'right';
        win.g30.spacing = 10;
        win.g30.st1 = win.g30.add('statictext',undefined,'Please select conversion method');
        win.g30.dd1 = win.g30.add('dropdownlist');
        win.g30.dd1.preferredSize = [200,20];
        var ConversionList = [];
        ConversionList[0] = "Straight Conversion";
        ConversionList[1] = "Bracketed 3x2EV to 7x2EV";
        ConversionList[2] = "Bracketed 5x2EV to 9x2EV";
        for(var x in ConversionList){
            win.g30.dd1.add('item', ConversionList[x].toString());
        win.g30.dd1.selection = 0;
        var ConversionSel = win.g30.dd1.selection.text.toString();
        win.g40 = win.p1.add('group');
        win.g40.orientation = "row";
        win.g40.alignment = 'right';
        win.g40.spacing = 10;
        win.g40.st2 = win.g40.add('statictext',undefined,'Please enter the exif exposure time of middle exposure');
        win.g40.et1 = win.g40.add('edittext',undefined,'1');
        win.g40.et1.preferredSize=[80,20];
        win.g40.et1.enabled = true;
        var TVsel = win.g40.et1.text.toString();
        win.g50 = win.p1.add('group');
        win.g50.orientation = "row";
        win.g50.alignment = 'right';
        win.g50.spacing = 10;
        win.g50.cb1 = win.g50.add('checkbox',undefined,'Use XMP exposure time instead');
        win.g50.cb1.helpTip = "Uses the xmp file's exposure time for the middle exposure instead";
        win.g300 = win.p1.add('group');
        win.g300.orientation = "row";
        win.g300.alignment = 'center';
        win.g300.spacing = 10;
        win.g300.bu1 = win.g300.add('button',undefined,'Process');
        win.g300.bu1.preferredSize = [240,30];
        win.g300.bu2 = win.g300.add('button',undefined,'Cancel');
        win.g300.bu2.preferredSize = [240,30];
        win.g300.bu1.onClick = function(){
            if(win.g10.et1.text == ''){
                alert("Input folder has not been selected!");
                return
            if(win.g20.et1.text == ''){
                alert("Output folder has not been selected!");
                return
            try{
            Prefs.folder1 = InputFolder;
            Prefs.folder2 = OutputFolder;
            var progressBar = function(title) {
                var w = new Window( 'palette', ' '+title, {x:0, y:0, width:340, height:60} ),
                pb = w.add( 'progressbar', {x:20, y:12, width:300, height:12}, 0, 100 ),
                st = w.add( 'statictext', {x:10, y:36, width:320, height:20}, '' );
                st.justify = 'center';
                w.center();
                this.reset = function( msg,maxValue ) {
                    st.text = msg;
                    pb.value = 0;
                    pb.maxvalue = maxValue||0;
                    pb.visible = !!maxValue;
                    w.show();
                this.hit = function() { ++pb.value; };
                this.hide = function() { w.hide(); };
                this.close = function() { w.close(); };
                this.show = function() { w.show(); };
                this.update = function() { w.update(); };
                this.layout = function() { w.layout.layout(); };
            function doPbar(){
                pBar.hit();
                pBar.hide();
                pBar.show();
            var count = 0;
            var group0 = InputFolder.getFiles(/\.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|srf| sr2)$/i);
            var group1 = InputFolder.getFiles(/\e01.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group2 = InputFolder.getFiles(/\e02.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group3 = InputFolder.getFiles(/\e03.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group4 = InputFolder.getFiles(/\e04.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            var group5 = InputFolder.getFiles(/\e05.(dng|crw|cr2|raw|raf|3fr|dcr|kdc|mrw|nef|nrw|orf|rw2|pef|x3f|s rf|sr2)$/i);
            count += group0.length;
            count += group1.length;
            count += group2.length;
            count += group3.length;
            count += group4.length;
            count += group5.length;
            if (count <1) return;
            if (win.g30.dd1.selection == 0) {
                var pBar = new progressBar("RAW to JPEG Straight Conversion");
                pBar.reset("Processing Files", (group1.length*2));
                for(var a in group0){
                    setEV(group0[a],0);
                    open(group0[a]);
                    var Name = decodeURI(group0[a].name).replace(/\.[^\.]+$/, '');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group0[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + ".jpg" );
                    SaveForWeb(exportFile,100);
                    doPbar();
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,TVval,0);
                pBar.close();
            } else
            if (win.g30.dd1.selection == 1) {
                var pBar = new progressBar("3 RAWs by 2 EV to 7 JPEGs by 2 EV");
                pBar.reset("Processing E01 Files", (group1.length*2));
                for(var a in group1){
                    setEV(group1[a],-4);
                    open(group1[a]);
                    var Name = decodeURI(group1[a].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e01$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group2[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E01.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/64"),-6);
                    doPbar();
                    setEV(group1[a],-2);
                    open(group1[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E02.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/16"),-4);
                    doPbar();
                pBar.reset("Processing E02 Files", (group2.length*3));
                for(var b in group2){
                    setEV(group2[b],-2);
                    open(group2[b]);
                    var Name = decodeURI(group2[b].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e02$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E03.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/4"),-2);
                    doPbar();
                    setEV(group2[b],0);
                    open(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E04.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,TVval,0);
                    doPbar();
                    setEV(group2[b],2);
                    open(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E05.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"4"),2);
                    doPbar();
                pBar.reset("Processing E03 Files", (group3.length*2));
                for(var c in group3){
                    setEV(group3[c],2);
                    open(group3[c]);
                    var Name = decodeURI(group3[c].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e03$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group2[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E06.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"16"),4);
                    doPbar();
                    setEV(group3[c],4);
                    open(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E07.jpg" );
                    SaveForWeb(exportFile,100);
                    doPbar();
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"64"),6);
                pBar.close();
            } else
            if (win.g30.dd1.selection == 2) {
                var pBar = new progressBar("5 RAWs by 2 EV to 9 JPEGs by 2 EV");
                pBar.reset("Processing E01 Files", (group1.length*2));
                for(var a in group1){
                    setEV(group1[a],-4);
                    open(group1[a]);
                    var Name = decodeURI(group1[a].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e01$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[a]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E01.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/256"),-8);
                    doPbar();
                pBar.reset("Processing E02 Files", (group2.length*3));
                for(var b in group2){
                    setEV(group2[b],-4);
                    open(group2[b]);
                    var Name = decodeURI(group2[b].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e02$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E02.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/64"),-6);
                    doPbar();
                    setEV(group2[b],-2);
                    open(group2[b]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E03.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/16"),-4);
                    doPbar();
                pBar.reset("Processing E03 Files", (group3.length*3));
                for(var c in group3){
                    setEV(group3[c],-2);
                    open(group3[c]);
                    var Name = decodeURI(group3[c].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e03$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E04.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"1/4"),-2);
                    doPbar();
                    setEV(group3[c],0);
                    open(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E05.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,TVval,0);
                    doPbar();
                    setEV(group3[c],2);
                    open(group3[c]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E06.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"4"),2);
                    doPbar();
                pBar.reset("Processing E04 Files", (group4.length*3));
                for(var d in group4){
                    setEV(group4[d],2);
                    open(group4[d]);
                    var Name = decodeURI(group4[d].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e04$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[d]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E07.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"16"),4);
                    doPbar();
                    setEV(group4[d],4);
                    open(group4[d]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E08.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"64"),6);
                    doPbar();
                pBar.reset("Processing E05 Files", (group3.length*2));
                for(var e in group5){
                    setEV(group5[e],4);
                    open(group5[e]);
                    var Name = decodeURI(group5[e].name).replace(/\.[^\.]+$/, '');
                    Name = Name.replace(/e05$/i,'');
                    var TVval = TVsel;
                    if (win.g50.cb1.value) TVval = getEV(group3[e]);
                    var exportFile = new File( OutputFolder + "/" + Name + "E09.jpg" );
                    SaveForWeb(exportFile,100);
                    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    putXMPData(exportFile,ExifEV(String(TVval),"256"),8);
                    doPbar();
                pBar.close();
            var desc2 = new ActionDescriptor();
            desc2.putString(0, Prefs.toSource());
            app.putCustomOptions('0bafbed0-0bc7-11e1-be50-0800200c9a66', desc2, true );
            win.close(0);
            }catch(e){alert(e + " - " +e.line);}
        win.center();
        win.show();
        app.displayDialogs = DialogModes.NO;
    function ExifEV(Input,Multiplier) {
        var EVval = Math.abs(eval(Input)*eval(Multiplier)); // Positive Decimal
        var EVvalN = 1; // Numerator
        var EVvalD = 1; // Denominator
        if (EVval < 0.5) EVvalD = Math.floor(1/EVval); else // For values less than 1/2
        // For values greater than 1/2 or values less than 1-1/2, returns 1000ths
        if (EVval < 1 || EVval > 1) {
            EVvalN = Math.floor(EVval*1000);
            EVvalD = 1000;
        } else                                   
        if (EVval > 1.5) EVvalN = Math.floor(EVval); // For values greater than 1-1/2
        return String(EVvalN + "/" + EVvalD); // Return fraction
    function getEV(thumb){
        var Name = decodeURI(thumb.name).replace(/\.[^\.]+$/, '');
        var file = new File(thumb.path + "/" + Name + ".xmp");
        try{
            if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
            if(file.exists){
                file.open('r');
                file.encoding = "UTF8";
                file.lineFeed = "unix";
                file.open("r", "TEXT", "????");
                var xmpStr = file.read();
                file.close();
            }else{
                var xmpStr='';
            var xmp = new XMPMeta( xmpStr );
            var exposureTime = xmp.getProperty(XMPConst.NS_EXIF, 'ExposureTime');
            if(exposureTime  == undefined) exposureTime = 1;
        }catch(e){alert(e+"-"+e.line);}
        return exposureTime;
    function setEV(thumb,evValue){
        var Name = decodeURI(thumb.name).replace(/\.[^\.]+$/, '');
        var file = new File(thumb.path + "/" + Name + ".xmp");
        try{
            if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
            if(file.exists){
                file.open('r');
                file.encoding = "UTF8";
                file.lineFeed = "unix";
                file.open("r", "TEXT", "????");
                var xmpStr = file.read();
                file.close();
            }else{
                var xmpStr='';
            var xmp = new XMPMeta( xmpStr );
            var exposureValue = xmp.getProperty(XMPConst.NS_CAMERA_RAW, "Exposure");
            xmp.deleteProperty(XMPConst.NS_CAMERA_RAW, "Exposure");
            xmp.setProperty(XMPConst.NS_CAMERA_RAW, "Exposure",Number(evValue));
            file.open('w');
            file.encoding = "UTF8";
            file.lineFeed = "unix";
            file.write( xmp.serialize() );
            file.close();
            if(exposureValue  == undefined) exposureValue = 0;
        }catch(e){alert(e+"-"+e.line);}
        return exposureValue;
    function putXMPData(fileName,exposureTime,evValue){
        if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
        var xmpf = new XMPFile(fileName.fsName, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_UPDATE | XMPConst.OPEN_USE_SMART_HANDLER );
        var xmp = xmpf.getXMP();
        try{
            xmp.setProperty(XMPConst.NS_TIFF, 'Make', 'Canon');
            xmp.setProperty(XMPConst.NS_TIFF, 'Model', 'Canon EOS REBEL T1i');
            xmp.setProperty(XMPConst.NS_EXIF, 'ExposureTime', exposureTime);
            xmp.setProperty(XMPConst.NS_EXIF, 'FNumber', '63/10');
            xmp.setProperty(XMPConst.NS_CAMERA_RAW, 'Exposure',Number(evValue));
            if (xmpf.canPutXMP(xmp)) {
                    xmpf.putXMP(xmp);
                }else{
                    alert(e.message);
                xmpf.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
        }catch(e){}
    function SaveForWeb(saveFile,jpegQuality) {
        var sfwOptions = new ExportOptionsSaveForWeb();
        sfwOptions.format = SaveDocumentType.JPEG;
        sfwOptions.includeProfile = false;
        sfwOptions.interlaced = 0;
        sfwOptions.optimized = true;
        sfwOptions.quality = jpegQuality;
        activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
    The script seems to work decent, so I plan on adding the other conversions I mentioned earlier, to it.  If there is a way of getting the exposure time directly from the raw file, please let me know.

  • How to execute a batch processing thought a script

    Hi all,
    I have created a batch processing with Executing a javascript. B'coz i have to open multiple files, so that i m using batch processing.
    Now i m want to execute the particular batch process through the javascript.
    Is it possible to run through javascript?
    Please let me know your ideas or suggesions.
    Thanks and regards,
    Christy.

    Hi George,
    Actually my process is need to open multiple Forms in Acrobat 9, Clear the form fields, and enable the submenu "Extend Featurs in Adobe Reader " which is in "Advance" menu.
    I m trying to do this process using Acrobat javascript.
    Thanks and Regards,
    Christy

Maybe you are looking for