Imagecatalogue.jsx script

Hi.
I'm using the imagecatalogue.jsx script to populate a page.
At the moment, the page it populates is a custom size.
does anybody know how i make populate to an A4? Is there a code i can put into the script?
Any help is very much appreciated.
Many thanks

Just figured it out - it populated to what ever the pre defined workspace was...doh?

Similar Messages

  • Command to Export project as Final Cut Pro XML from jsx script

    Hi All,
    Can somebody get me the command to export the project as final cut pro xml from jsx script.
    I was using the extension builder script earlier for cs6 panel development, so we were using pjct.exportFinalCutProXML("pathname");
    Now I am working for panel in Premiere CC so working on HTML 5 panel and qe dom scripting(.jsx).
    In some jsx examples i got there is script to export sequence as final cut pro xml but cannot get the code for project export.
    project.activeSequence.exportAsFinalCutProXML(entire_out_path);
    Also please let me know if there are any kind of reference available about all the functions and properties in the pe dom scripting for premiere pro cc.
    I am using premiere pro cc 7.1, windows 7, Eclipse Kepler.
    Thanks in advance,
    Anoop NR

    When you reimport the exported project XML to FCP, do you get the full project or just the single bin/sequence? If you get the full project then it sounds like you need Premiere help, not FCP help ... have you tried asking on the Adobe forums? If you only get the single bin/sequence then it seems you might have inadvertently selected those prior to creating the project export. Try making sure that your FCP Browser window is active and that you have not selected anything within that window prior to using the File > Export > XML command. If that still causes issue then you might try using an earlier FCP XML version.
    Hope it helps
    Andy

  • InDesign server CS 5.5 - app.scriptArgs.get doesn't work in jsx script or simpleclient problem

    Hello
    I'm working with Adobe InDesing Server CS 5.5 and having problem that *.jsx script is not able to read input parameters passwd from sampleclient.exe or SOAP (same story in both cases)
    I run following command:
         sampleclient.exe -host localhost:8080 "c:\CreateJPEG.jsx" param1="1"
    also
         sampleclient.exe -host localhost:8080 "c:\CreateJPEG.jsx" param1=1
    and even
         sampleclient.exe -host localhost:8080 "c:\CreateJPEG.jsx" "param1=1"
    app.scriptArgs.get("param1") is always FALSE (see script body below).
    Please help, I couldn't find an answer anywhere. All documents stats that this should work in a way I described, but it doesn't. Script is performed but param1 is not set.
    Here is the script:
    #target  InDesignServer
    app.scriptPreferences.version = 7.0;
    main();
    function main()
      var eRet;   
      if (app.scriptArgs.get("param1"))
        var sXMLFilePath = "C:\\CreateJPEG.xml";
        var eRet = app.createJpeg (sXMLFilePath);

    I am having the same issue. I am pssing thru SOAP call through
         sampleclient.java -host localhost:12345 "c:\myJSXScript.jsx" myXml="myXmlLocation"
    JSX:
    function main() {
        try {
            var myInDesignXml;
            app.consoleout("isDefined:=" +app.scriptArgs.isDefined("myXml"));
            if (app.scriptArgs.isDefined("myXml")) {
              myInDesignXml = app.scriptArgs.getValue("myXml")
            app.consoleout("myXml:=" + myXml);
        } catch (e) {
            app.consoleout('General Exception');
        return result;
    main();
    Output:
    isDefined:=false
    I should get the text that we have assigned to myXml param.
    Please Help on this.
    Regards,
    JK

  • [Bug] PhotoshopCallback event gets triggered by a jsx script !!

    Hello !
    It looks like there is a bug in the PhotoshopCallback mechanism.
    I registered a listener for "setd" photoshop events, and the listener is triggered by a jsx script !
    Jsx scripts never trigger events in Photoshop. If I setup a "normal" listener in Photoshop (using notifiers), it is not triggered.
    This is a problem for me because I get notified of my own modifications, and I have no way of discriminating. That can cause infinite loops, and I can't get around it !
    Are you aware of that problem ?
    Below is my code for registering my listener (in my extension) :
    function registerPSEvent() {
      var csInterface = new CSInterface();
      var event_ = new CSEvent("com.adobe.PhotoshopRegisterEvent", "APPLICATION");
      event_.extensionId = csInterface.getExtensionID();
      event_.appId = csInterface.getApplicationID();
      event_.data = "1936028772, 1165517672, 1383294324"; //setd, Exch, Rset
      csInterface.dispatchEvent(event_);
      csInterface.addEventListener("PhotoshopCallback" , function(event) {
           console.log("photoshop event occured : " + event.data);
    And the jsx code that triggers it (a Fill Layer (Layer/New Fill Layer/Solid Color) must be active for it to work) :
    #target photoshop
    function setColorOfFillLayer( sColor ) {
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( stringIDToTypeID('contentLayer'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var fillDesc = new ActionDescriptor();
                var colorDesc = new ActionDescriptor();
                colorDesc.putDouble( charIDToTypeID('Rd  '), sColor.rgb.red );
                colorDesc.putDouble( charIDToTypeID('Grn '), sColor.rgb.green );
                colorDesc.putDouble( charIDToTypeID('Bl  '), sColor.rgb.blue );
            fillDesc.putObject( charIDToTypeID('Clr '), charIDToTypeID('RGBC'), colorDesc );
        desc.putObject( charIDToTypeID('T   '), stringIDToTypeID('solidColorLayer'), fillDesc );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
    var targetColor = new SolidColor();
        targetColor.rgb.red = 255;
        targetColor.rgb.green = 0;
        targetColor.rgb.blue = 0;
        setColorOfFillLayer (targetColor);

    Hi,
    in SE24 , go to methods tab,
    From left 4th button.
    i.e
    first one is Parameters
      2          Exceptions
      3          Code
      4          Detail View
    how come you missed this one.
    check it.
    regards
    vijay

  • Import items to a bin using jsx scripting

    Hi All,
         I am working on creating a panel for premire pro cc 7,1 using eclipse and jsx scripting, I have to import files to premiere based on some external parameters, sometimes i need to import items inside a bin, I am facing problems to import the items to a bin, with the samples codes I am having I am only able to import to the root project.  Is it possible in the new premiere pro cc 7.1 (from jsx scripting/qedom) we can import files directly under a bin.
    qe.project.importFiles(import_these) <-- import items to project
    I am using windows 7, eclipse kepler, premire pro cc 7.1, extendscript toolkit cc.
    expecting your immediate response.
    Thanks and Regards,
    Anoop

    I wasn't clear if you were using the "Set Logging Bin" command in the Browser - though you probably were ... If not:
    Control Click on the bin you want & select >Set logging bin (or File>Set Logging Bin). Once that is done, any files brought in through any means (including keyboard shortcut) should end up in the newly designated bin. FCP displays a slate on the left side of the icon to show which bin is set as the default.
    I'm not aware of a way to change the selection of a bin without using the mouse, though, you might be able to generate your own shortcut should you choose to do so.
    Good luck.
    x

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • How to InDesign CS5 - .jsx script export multiple PDF??

    ok I have a datamerge process with .jsx script that is exporting to single page pdf files. What I need it for 2 of these pages to be in one (multi-page pdf). how can I accomplish this?
    here is the script I have here is my function & teardown:
    function mySnippet(){
              //<fragment>
              var myPageName, myFilePath, myFile;
              var myDocument = app.documents.item(0);
              var myBaseName = myDocument.name;
              for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){
                        myPageName = myDocument.pages.item(myCounter).name;
                                app.pdfExportPreferences.pageRange = myPageName;
                        //app.pdfExportPreferences.pageRange = myPageName, "15-16";
                switch(myPageName) {
                        case "1" : myPageName = "Human Card Approval";
                                  docType = ""  break;
                        case "2" : myPageName = "Pet Card Approval";
                                  docType = "" break;
                        case "3" : myPageName = "Rx FAQ EN";
                                  docType = "FAQ" break;
                        case "4" : myPageName = "Rx FAQ ES";
                                  docType = "FAQ" break;
                        case "5" : myPageName = "Labs & Imaging FAQ EN";
                                  docType = "FAQ" break;
                        case "6" : myPageName = "Labs & Imaging FAQ ES";
                                  docType = "FAQ" break;
                        case "7" : myPageName = "Equalizer No Cards EN";
                                  docType = "Equalizer" break;
                        case "8" : myPageName = "Equalizer w_cards EN";
                                  docType = "Equalizer" break;
                        case "9" : myPageName = "Equalizer Slick Stand EN";
                                  docType = "Equalizer" break;
                        case "10" : myPageName = "Equalizer No Cards ES";
                                  docType = "Equalizer" break;
                        case "11" : myPageName = "Equalizer w_cards ES";
                                  docType = "Equalizer" break;
             case "12" : myPageName = "Equalizer Slick Stand ES";
                                  docType = "Equalizer" break;
                        case "13" : myPageName = "Medicare Donut Hole EN";
                                  docType = "Donut Hole" break;
             case "14" : myPageName = "Medicare Donut Hole ES";
                                  docType = "Donut Hole" break;
             case "15" : myPageName = "Trifold EN Outside";
                                  docType = "TriFold" break;
                        case "16" : myPageName = "Trifold EN Inside";
                                  docType = "TriFold" break;
                        case "17" : myPageName = "Pet w Cards EN";
                                  docType = "Pet" break;
             case "18" : myPageName = "Pet Slick Stand EN ";
                                  docType = "Pet" break;
                        case "19" : myPageName = "Pet w Cards ES";
                                  docType = "Pet" break;
             case "20" : myPageName = "Pet Slick Stand ES";
                                  docType = "Pet" break;
                        fileName = group + " " + myPageName + " " + date + ".pdf";
                        myFilePath = dirPath + docType + "/" + fileName;
                        myFile = new File(myFilePath);
                        myDocument.exportFile(ExportFormat.pdfType, myFile, false);
              //</fragment>
    //</snippet>
    //<teardown>
    function myTeardown(){
    Here is what I need exported as one pdf file:
             case "15" : myPageName = "Trifold EN Outside";
                                  docType = "TriFold" break;
                        case "16" : myPageName = "Trifold EN Inside";
                                  docType = "TriFold" break;

    That would require scripting. You might inquire in the InDesign Scripting forum for scripts that might work.

  • Help editing the imageTracing.jsx Script

    Hello, I am looking for guidance on how to properly edit the imageTracing.jsx script in Illustrator CC. At the moment it only defaults to using a basic black and white trace, I need the trace to use one of my presets, expand the trace and save it. I need to run thousands of frames of bitmap animation through a batch trace process essentially. I've tried to batch it through Bridge, but it just throws up and error (59 I believe) and I've set up an action to try and batch that way but it never completes the batch by expanding the trace.
    I've tried editing the script myself, but if I change the preset numeral it appears to break the save and close functionality of the script. Not quite sure what I am doing wrong. I've also tried adding a line for expanding the trace but I may be using the wrong syntax  --- tracing.expandTracing(); ---
    Below is the default script as shipped with Illustrator, no changes made.
    // Main Code [Execution of script begins here]
    // uncomment to suppress Illustrator warning dialogs
    // app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    // Collectable files
    var COLLECTABLE_EXTENSIONS = ["bmp", "gif", "giff", "jpeg", "jpg", "pct", "pic", "psd", "png", "tif", "tiff"];
    var destFolder, sourceFolder;
    // Select the source folder
    sourceFolder = Folder.selectDialog( 'Select the SOURCE folder...', '~' );
    //sourceFolder = new Folder("C:/Users/<Username>/Desktop/1");
    if(sourceFolder != null)
        // Select the destination folder
        destFolder = Folder.selectDialog( 'Select the DESTINATION folder...', '~' );       
        //destFolder = new Folder("C:/Users/<Username>/Desktop/2");
    if(sourceFolder != null && destFolder != null)
            //getting the list of the files from the input folder
            var fileList = sourceFolder.getFiles();
            var errorList;
            var tracingPresets = app.tracingPresetsList;
            for (var i=0; i<fileList.length; ++i)
                if (fileList[i] instanceof File)
                     try
                            var fileExt = String(fileList[i]).split (".").pop();
                            if(isTraceable(fileExt) != true)
                                continue;
                            // Trace the files by placing them in the document.
                            // Add a document in the app
                            var doc = app.documents.add();
                            // Add a placed item
                            var p = doc.placedItems.add();
                            p.file = new File(fileList[i]);
                            // Trace the placed item
                            var t = p.trace();
                            t.tracing.tracingOptions.loadFromPreset(tracingPresets[3]);
                            app.redraw();
                            var destFileName = fileList[i].name.substring(0, fileList[i].name.length - fileExt.length-1) + "_" +fileExt;
                            var outfile = new File(destFolder+"/"+destFileName);
                            doc.saveAs(outfile);
                            doc.close();
                    catch (err)
                            errorStr = ("Error while tracing "+ fileList[i].name  +".\n" + (err.number & 0xFFFF) + ", " + err.description);
                            // alert(errorStr);
                            errorList += fileList[i].name + " ";
           fileList = null;
           alert("Batch process complete.");
    else
           alert("Batch process aborted.");
    sourceFolder = null;
    destFolder = null;
    function isTraceable(ext)
         var result = false;
         for (var i=0; i<COLLECTABLE_EXTENSIONS.length; ++i)
              if(ext == COLLECTABLE_EXTENSIONS[i])
                result = true;
                break;
        return result;
    And this is the amended version with my change to lines 57 and 58.
    // Main Code [Execution of script begins here]
    // uncomment to suppress Illustrator warning dialogs
    // app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    // Collectable files
    var COLLECTABLE_EXTENSIONS = ["bmp", "gif", "giff", "jpeg", "jpg", "pct", "pic", "psd", "png", "tif", "tiff"];
    var destFolder, sourceFolder;
    // Select the source folder
    sourceFolder = Folder.selectDialog( 'Select the SOURCE folder...', '~' );
    //sourceFolder = new Folder("C:/Users/<Username>/Desktop/1");
    if(sourceFolder != null)
        // Select the destination folder
        destFolder = Folder.selectDialog( 'Select the DESTINATION folder...', '~' );       
        //destFolder = new Folder("C:/Users/<Username>/Desktop/2");
    if(sourceFolder != null && destFolder != null)
            //getting the list of the files from the input folder
            var fileList = sourceFolder.getFiles();
            var errorList;
            var tracingPresets = app.tracingPresetsList;
            for (var i=0; i<fileList.length; ++i)
                if (fileList[i] instanceof File)
                     try
                            var fileExt = String(fileList[i]).split (".").pop();
                            if(isTraceable(fileExt) != true)
                                continue;
                            // Trace the files by placing them in the document.
                            // Add a document in the app
                            var doc = app.documents.add();
                            // Add a placed item
                            var p = doc.placedItems.add();
                            p.file = new File(fileList[i]);
                            // Trace the placed item
                            var t = p.trace();
                            t.tracing.tracingOptions.loadFromPreset(tracingPresets[1]);
      tracing.expandTracing();
      app.redraw();
                            var destFileName = fileList[i].name.substring(0, fileList[i].name.length - fileExt.length-1) + "_" +fileExt;
                            var outfile = new File(destFolder+"/"+destFileName);
                            doc.saveAs(outfile);
                            doc.close();
                    catch (err)
                            errorStr = ("Error while tracing "+ fileList[i].name  +".\n" + (err.number & 0xFFFF) + ", " + err.description);
                            // alert(errorStr);
                            errorList += fileList[i].name + " ";
           fileList = null;
           alert("Batch process complete.");
    else
           alert("Batch process aborted.");
    sourceFolder = null;
    destFolder = null;
    function isTraceable(ext)
         var result = false;
         for (var i=0; i<COLLECTABLE_EXTENSIONS.length; ++i)
              if(ext == COLLECTABLE_EXTENSIONS[i])
                result = true;
                break;
        return result;
    Thanks in advance for your help, as you can imagine, manually tracing thousands of images for a client job will be a nightmare if I can't sort out a batch.

    hello,
    after line 32 :
    var tracingPresets = app.tracingPresetsList;
    do an alert :
    alert( app.tracingPresetsList );
    it'll show you the name of the differents presets
    then line 57, call the good preset :
    t.tracing.tracingOptions.loadFromPreset('here the name of your preset');
    for expanding :
    change line 58 like that :
    t.tracing.expandTracing();
    you forget (t.) at the beginning
    best wishes for the new year

  • Execute atn with JSX script

    Hi,
    i'm creating air application to execute atn script photoshop.
    Can i execute atn script in JSX script or in command line ?
    Regards

    Thanks,
    and i have another question, can i list actionName in a ActionSet with JSX ?
    Regards,

  • All hyperlinks but one fixed with Decode-new.jsx script

    Hi,
    I'm creating a course calendar for work and I have created registration icons that direct the user to a mailto: email link where I define the subject and the default body text in the email for every course. I have over 100 of these icon links and run the Decode-New.jsx script frequently to fix any of the hyperlink bug issues that happen in older versions of InDesign (I'm running on CS 6 but run on CC on my own personal system).
    The script fixes all but one of my mailto: links. I get the following error when I run the script:
    I've deleted the icon and recreated a new one and relinked the mailto and it didn't work. Then I copied and pasted an existing linked icon that does work and edited the mailto: to have the properties that I need....and that still didn't work. Then I saved the document and restarted my InDesign all together and did the 2 above steps again....and still nothing. I'm literally pasting in the exact same information of the mailto: url as in the other working links and just editing the subject title properties and it's just not working. I'm stumped.
    It would be ridiculous and bad UI to have all but 1 email registration link have predefined properties for the subject and body text. Any solutions?

    Any help would be appreciated. Outside of using script, I know my way around InDesign so I feel like I've exhausted every solution other than uninstalling and installing Indesign again, which is just too long of a process as I don't have administrative rights at work.

  • JSX script executed through CSXS timing out?

    So what I originally had was a simple .jsx script that I would execute from the Scripts menu. It would take several minutes to run as it iterates several hundred times making modifications to text layers.
    It came time that I wanted to upgrade the script with a Flash interface, which is what I've been working on. Since there is no true asynchronicity to be had, I've modified my .jsx script so that instead of running all in one go, the JavaScript function processes only one item at a time and returns its progress. Meanwhile the Flash interface sits in a loop, calling this function through CSXSInterface.instance.evalScript and updating a progress bar until it reads that there are no more items to process.
    Works great in theory, but for some reason the script will randomly stop around the 20th, 50th, whatever iteration, usually with a SyncResult status of InvalidInputParams (which I have NO idea how that could happen, since it's calling the exact same function with no parameters each time, and the function is returns the same XML string each time, with just a different number indicating progress).
    I tried experimentally increasing the batch size from 1 to 8 (so that the JavaScript function loops 8 times before returning back to Flash), and now it unceremoniously halts after pretty much every batch.
    Is there some kind of hidden execution timeout going on behind the scenes that is causing Flash to bail out of ActionScript when a JavaScript runs too long or something? If so, is there some way of disabling it? If not, does anyone know what could be going on here? Is there some way of dealing with this problem?
    Thanks,
    Dan.

    Sorry if it wasn't clear; this is a Flash panel running in Photoshop. CSXS is required to run the JavaScript that has access to the Photoshop DOM.
    Also, this is running CS4.
    Thanks,
    Dan.

  • [TUTORIAL] ADD YOUR OWN KEYBOARD SHORTCUTS TO YOUR JSX SCRIPTS

    This is for Windows only; it uses a feature to launch your favorite software via a keyboard shortcut. It’s been here for a while but it just never occurred to me to use it for this purpose.
    1.       Create a shortcut on the Desktop that points to your script.
    2.       Assign a keyboard shortcut to it. That’s it!!!!
    If you don't know how, here’s a step by step
    1.       Open the folder where all your scripts live
    2.       Right click on any of them and click on “Send to …” -> “Desktop (Create Shortcut)”
    3.       (Optional) Rename the shortcut; to help you remember it is a good practice to include the actual key combination
    4.       Right click on the shortcut, click on “Properties”
    5.       The Shortcut Key says “None”, place the cursor there and hit for example Ctrl+Alt+8
    6.       Click on “Apply” then on “Ok”
    7.       That’s it, go to Illustrator and hit your key combination.
    Notes:
    1.       Add the following line to the beginning of all your jsx scripts “#target Illustrator” (without the quotations)
    2.       If there are duplicate key combinations, your newly created shortcut will take precedence over any existing Illustrator shortcut used for something else, so…to help you see what key combos are available:
              1.       In Illustrator, go to “Edit” -> “Keyboard Shortcuts…”, then click on “Export text…”
              2.       The file is saved as a text delimited, open it with Excel or similar program to be able to sort
              3.       This is what I get, a sorted list that easily shows what’s available
    3.       If you have lost of scripts, your desktop will soon be overcrowded with icons, which many people really hate. An alternative could be to create a shortcut to the folder containing all your scripts and assign a key combination. When you’re in Illustrator and use the key combo the folder will open and you will have to double click on the file to run it. Not ideal….but your desktop will be uncluttered and is still better that going to the menus to run your scripts.
    any comments or questions are welcomed

    Carlos - it is not a windows security warning, and there is no checkbox. This is coming from extendscript (it has that icon when you alt-tab). Windows doesn't know that this is a script, the OS just launches extendscript with the file as an argument.
    The text is:
    You are about to run a script in Adobe Illustrator CS5. You should only run scripts from a trusted source. Do you want to run the script?

  • Set top and bottom inset spacing values in Text Frame Options via jsx script

    I am looking for a way to set the top and bottom inset spacing values only to 2 points in Text Frame Options via a .jsx scrpt.
    For years, I have used a script that sets Preferences, such as:
    with(app.storyPreferences){
        opticalMarginAlignment = false;
        opticalMarginSize = 12;                // pts
    I would like to add the code to this same script that would make Top = 0p2 and Bottom 0p2 but leave Left and Right as 0p0.
    Any help would be greatly appreciated.

    Here is the full .jsx file that we now use to set preferences.
    Ideally, this could be modified to include setting any text frame created to have 0p2 inset Top and Bottom, but 0p0 Left and Right:
    //ApplicationTextDefaults
    //An InDesign CS2 JavaScript
    //Sets the application text defaults, which will become the text defaults for all
    //new documents. Existing documents will remain unchanged.
    with(app.textDefaults){
        alignToBaseline = false;        // align to baseline grid
        try {
    //        appliedFont = app.fonts.item("Times New Roman");
            appliedFont = app.fonts.item("Helvetica");
        catch (e) {}
        try {
            fontStyle = "Medium";
        catch (e) {}
        autoleading = 100;
        balanceRaggedLines = false;
        baselineShift = 0;
        capitalization = Capitalization.normal;
        composer = "Adobe Paragraph Composer";
        desiredGlyphScaling = 100;
        desiredLetterSpacing = 0;
        desiredWordSpacing = 100;
        dropCapCharacters = 0;
        if (dropCapCharacters != 0) {
            dropCapLines = 3;
            //Assumes that the application has a default character style named "myDropCap"
            //dropCapStyle = app.characterStyles.item("myDropCap");
        fillColor = app.colors.item("Black");
        fillTint = 100;
        firstLineIndent = "0pt";
    //    firstLineIndent = "14pt";
        gridAlignFirstLineOnly = false;
        horizontalScale = 100;
        hyphenateAfterFirst = 3;
        hyphenateBeforeLast = 4;
        hyphenateCapitalizedWords = false;
        hyphenateLadderLimit = 1;
        hyphenateWordsLongerThan = 5;
        hyphenation = true;
        hyphenationZone = "3p";
        hyphenWeight = 9;
        justification = Justification.leftAlign;
        keepAllLinesTogether = false;
        keepLinesTogether = true;
        keepFirstLines = 2;
        keepLastLines = 2;
        keepWithNext = 0;
        kerningMethod = "Optical";
        kerningValue = 0;
        leading = 6.3;
    //    leading = 14;
        leftIndent = 0;
        ligatures = true;
        maximumGlyphScaling = 100;
        maximumLetterSpacing = 0;
        maximumWordSpacing = 160;
        minimumGlyphScaling = 100;
        minimumLetterSpacing = 0;
        minimumWordSpacing = 80;
        noBreak = false;
        otfContextualAlternate = true;
        otfDiscretionaryLigature = true;
        otfFigureStyle = OTFFigureStyle.proportionalOldstyle;
        otfFraction = true;
        otfHistorical = true;
        otfOrdinal = false;
        otfSlashedZero = true;
        otfSwash = false;
        otfTitling = false;
        overprintFill = false;
        overprintStroke = false;
        pointSize = 6.3;
    //    pointSize = 11;
        position = Position.normal;
        rightIndent = 0;
        ruleAbove = false;
        if(ruleAbove == true){
            ruleAboveColor = app.colors.item("Black");
            ruleAboveGapColor = app.swatches.item("None");
            ruleAboveGapOverprint = false;
            ruleAboveGapTint = 100;
            ruleAboveLeftIndent = 0;
            ruleAboveLineWeight = .25;
            ruleAboveOffset = 14;
            ruleAboveOverprint = false;
            ruleAboveRightIndent = 0;
            ruleAboveTint = 100;
            ruleAboveType = app.strokeStyles.item("Solid");
            ruleAboveWidth = RuleWidth.columnWidth;
        ruleBelow = false;
        if(ruleBelow == true){
            ruleBelowColor = app.colors.item("Black");
            ruleBelowGapColor = app.swatches.item("None");
            ruleBelowGapOverprint = false;
            ruleBelowGapTint = 100;
            ruleBelowLeftIndent = 0;
            ruleBelowLineWeight = .25;
            ruleBelowOffset = 0;
            ruleBelowOverprint = false;
            ruleBelowRightIndent = 0;
            ruleBelowTint = 100;
            ruleBelowType = app.strokeStyles.item("Solid");
            ruleBelowWidth = RuleWidth.columnWidth;
        singleWordJustification = SingleWordJustification.leftAlign;
        skew = 0;
        spaceAfter = 0;
        spaceBefore = 0;
        startParagraph = StartParagraph.anywhere;
        strikeThru = false;
        if(strikeThru == true){
            strikeThroughColor = app.colors.item("Black");
            strikeThroughGapColor = app.swatches.item("None");
            strikeThroughGapOverprint = false;
            strikeThroughGapTint = 100;
            strikeThroughOffset = 3;
            strikeThroughOverprint = false;
            strikeThroughTint = 100;
            strikeThroughType = app.strokeStyles.item("Solid");
            strikeThroughWeight = .25;
        strokeColor = app.swatches.item("None");
        strokeTint = 100;
        strokeWeight = 0;
        tracking = 0;
        underline = false;
        if(underline == true){
            underlineColor = app.colors.item("Black");
            underlineGapColor = app.swatches.item("None");
            underlineGapOverprint = false;
            underlineGapTint = 100;
            underlineOffset = 3;
            underlineOverprint = false;
            underlineTint = 100;
            underlineType = app.strokeStyles.item("Solid");
            underlineWeight = .25
        verticalScale = 100;
    //Units & Increments preference panel
    //Must do this to make sure our units that we set are in points. The vert and horiz
    //units that get set default to the current measurement unit. We set it to points
    //so we can be sure of the value. We'll reset it later to the desired setting.
    with(app.viewPreferences){
        horizontalMeasurementUnits = MeasurementUnits.points;    // Ruler Units, horizontal
        verticalMeasurementUnits = MeasurementUnits.points;        // Ruler Units, vertical
    //General preference panel
    with(app.generalPreferences){
        pageNumbering = PageNumberingOptions.section;    // Page Numbering, View
        toolTips = ToolTipOptions.normal;                    // Tool Tips
    // Not supported in CS4
    //    toolsPalette = ToolsPaletteOptions.doubleColumn;    // Floating Tool Palette
        completeFontDownloadGlyphLimit = 2000;                // Always Subset Fonts...
        try {
            //Wrapped in try/catch in case it is run with CS4 and earlier to avoid the error
            preventSelectingLockedItems = false;                // Needed for CS5+
        catch (e) {}
    //Type preference panel
    with (app.textEditingPreferences){
        tripleClickSelectsLine = true;    // Triple Click to Select a Line
        smartCutAndPaste = true;        // Adjust Spacing Automatically when Cutting and Pasting Words
        dragAndDropTextInLayout = false;    // Enable in Layout View
        allowDragAndDropTextInStory = true;    // Enable in Story Editor
    with(app.textPreferences){
        typographersQuotes = true;            // Use Typographer's Quotes
        useOpticalSize = true;                // Automatically Use Correct Optical Size
        scalingAdjustsText = true;            // Adjust Text Attributes when Scaling
        useParagraphLeading = false;    // Apply Leading to Entire Paragraphs
        linkTextFilesWhenImporting = false;    // Create Links when Placing Text and Spreadsheet Files
    // Missing following (Font Preview Size, Past All Information/Text Only)
    //Advanced Type preference panel
    with(app.textPreferences){
        superscriptSize = 58.3;                // Superscript, size
        superscriptPosition = 33.3;            // Superscript, position
        subscriptSize = 58.3;                // Subscript, size
        subscriptPosition = 33.3;            // Subscript, position
        smallCap = 70;                        // Smallcap
    with(app.imePreferences){
        inlineInput = false;                // Use Inline Input for Non-Latin Text
    //Composition preference panel
    with(app.textPreferences){
        highlightKeeps = false;                    // Keep Violations
        highlightHjViolations = false;            // H&J Violations
        highlightCustomSpacing = false;            // Custom Tracking/Kerning
        highlightSubstitutedFonts = true;    // Substituted Fonts
        highlightSubstitutedGlyphs = false;    // Substituted Glyphs
        justifyTextWraps = false;                // Justify Text Next to an Object
        abutTextToTextWrap = true;                // Skip by Leading
        zOrderTextWrap = false;                    // Text Wrap Only Affects Text Beneath
    //Units & Increments preference panel
    with(app.viewPreferences){
        rulerOrigin = RulerOrigin.spreadOrigin;                    // Ruler Units, origin
    //    These are set at the end of the script after all the changes have been made
    //    horizontalMeasurementUnits = MeasurementUnits.points;    // Ruler Units, horizontal
    //    verticalMeasurementUnits = MeasurementUnits.inches;        // Ruler Units, vertical
        pointsPerInch = 72;                    // Point/Pica Size, Points/Inch
        cursorKeyIncrement = 1;                // Keyboard Increment, Cursor Key
    with(app.textPreferences){
        baselineShiftKeyIncrement = 2;    // Keyboard Increment, Baseline Shift
        leadingKeyIncrement = 2;        // Keyboard Increment, Size/Leading
        kerningKeyIncrement = 20;            // Keyboard Increment, Kerning
    //Grids preference panel
    with(app.gridPreferences){
        baselineColor = UIColors.lightBlue;    // Baseline Grid, Color
        baselineStart = 48;                        // Baseline Grid, Start
        baselineDivision = 6;                    // Baseline Grid, Increment Every
        baselineViewThreshold = 50;                // Baseline Grid, View Threshold
        baselineGridRelativeOption = BaselineGridRelativeOption.topOfPageOfBaselineGridRelativeOption;    // Baseline Grid, Relative To
        gridColor = UIColors.lightGray;            // Document Grid, Color
        horizontalGridlineDivision = 12;    // Document Grid, Horizontal, Gridline Every
        horizontalGridSubdivision = 12;            // Document Grid, Horizontal, Subdivisions
        verticalGridlineDivision = 12;            // Document Gird, Vertical, Gridline Every
        verticalGridSubdivision = 12;            // Document Grid, Vertical, Subdivisions
        gridsInBack = true;                        // Grids in Back
        documentGridSnapto = false;                // snap to grid or not
        documentGridShown = false;                // show document grid
    //Guides & Pasteboard preference panel
    with(app.documentPreferences){
        marginGuideColor = UIColors.violet;                // Color, Margins
        columnGuideColor = UIColors.magenta;            // Color, Columns
    with(app.pasteboardPreferences){
        bleedGuideColor = UIColors.fiesta;                // Color, Bleed
        slugGuideColor = UIColors.gridBlue;                // Color, Slug
        previewBackgroundColor = UIColors.lightGray;    // Color, Preview Background
        minimumSpaceAboveAndBelow = 72;                    // Minimum Vertical Offset
    with(app.viewPreferences){
        guideSnaptoZone = 4;                            // Snap to Zone
    with(app.guidePreferences){
        guidesInBack = false;                            // Guides in Back
    //Dictionary preference panel
    with(app.dictionaryPreferences){
        composition = ComposeUsing.both;    // Hyphenatin Exceptions, Compose Using
        mergeUserDictionary = false;    // Merge User Dictionary into Document
        recomposeWhenChanged = true;    // Recompose All Stories When Modified
    // Missing (Lang, Hyph, Spelling, Double Quotes, Single Quotes)
    //Spelling preference panel
    with(app.spellPreferences){
        checkMisspelledWords = true;                    // Find, Misspelled Words
        checkRepeatedWords = true;                        // Find, Repeated Words
        checkCapitalizedWords = true;                    // Find, Uncapitalized Words
        checkCapitalizedSentences = true;                // Find, Uncapitalized Sentences
        dynamicSpellCheck = true;                        // Enable Dynamic Spelling
        misspelledWordColor = UIColors.red;                // Color, Misspelled Words
        repeatedWordColor = UIColors.green;                // Color, Repeated Words
        uncapitalizedWordColor = UIColors.green;    // Color, Uncapitalized Words
        uncapitalizedSentenceColor = UIColors.green;    // Color, Uncapitalized Sentences
    //Autocorrect preference panel
    with(app.autoCorrectPreferences){
        autoCorrect = true;                            // Enable Autocorrect
        autoCorrectCapitalizationErrors = false;    // Autocorrect Capitalization
    // Missing (Language, Misspelled word pairs)
    //Display Performance preference panel
    with(app.displayPerformancePreferences){
        defaultDisplaySettings = ViewDisplaySettings.typical;    // Preserve Object-Level
        persistLocalSettings = false;
    // Missing (antialiasiing, greek below
    //Story Editor Display preference panel
    with(app.galleyPreferences){
        textColor = InCopyUIColors.black;                // Text Color
        backgroundColor = InCopyUIColors.white;            // Background
        smoothText = true;                                // Enable Anti-Aliasing
        antiAliasType = AntiAliasType.grayAntialiasing;    // Type
        cursorType = CursorTypes.standardCursor;    // Cursor Type
        blinkCursor = true;                                // Blink
    // Missing (Font, Size, Line Spacing & Theme)
    //File Handling preference panel
    with(app.generalPreferences){
        includePreview = true;                        // Always Save Preview Images with Doc
        previewSize = PreviewSizeOptions.medium;    // Preview Size
    with(app.clipboardPreferences){
        preferPDFWhenPasting = false;                // Prefer PDF When Pasting
        copyPDFToClipboard = true;                    // Copy PDF to Clipboard
        preservePdfClipboardAtQuit = false;            // Preserve PDF Data at Quit
    // Missing (Enable Version Cue)
    //    Optical margin (hanging punctuation, outside margins)
    with(app.storyPreferences){
        opticalMarginAlignment = false;
        opticalMarginSize = 12;                // pts
    //Wrap Up (do at end of script)
    //Units & Increments preference panel
    //Must do this to make sure our units that we set are in points. The vert and horiz
    //units that get set default to the current measurement unit. We set it to points
    //so we can be sure of the value. We'll reset it later to the desired setting.
    with(app.viewPreferences){
        horizontalMeasurementUnits = MeasurementUnits.picas;    // Ruler Units, horizontal
        verticalMeasurementUnits = MeasurementUnits.inches;    // Ruler Units, vertical
    //    These two flags are turned off to avoid the error message about
    //    missing image links when InDesign opens an ad. This can especially
    //    be a problem when doing batch processes.
    with(app.linkingPreferences){
        checkLinksAtOpen = false;            // checkbox: true/false
        findMissingLinksAtOpen = false;        // checkbox: true/false

  • Help alternating find and changebylist.jsx script that comes with CC samples

    i did alternate the same vbs script to suit my needs and i was happy about it (likeChild when you give him his favourite toy) but i run in som problems with it....when i copy and place the vbs script on other computer i want it to use it invokes CS6 instead of CC...i tried everything i could think of but no luck...same thing happens every time i try to use it open CS6 instead CC in which i run it...on the computer i did write it the script run like charm(on both computers i have CS6 and CC)....so i decided to use the jsx version of same script....
    then when i try that script:
    1. the dialog box is opening only when my cursor is in textframe allowing me to select what i want to change 1.document 2.selected story. 3 selection
    2. when i select 2 text frames and on document i have 3 or more the script does not change in 2 selected frames instead it does in all frames
    i need to alternate this script
    when i select text frame to open dialogbox allowing me to pick 2 of 3 above mentioned options the number 2 and 3
    so it do the find and change only in text frames i selected (when it is selected with selection tool) not in all frames
    i tried to do that my self but im kinda short of knowledge
    i tried to alternate the case dialog box is open adding the line case "TextFrame": in this portion of script
    if(app.documents.length > 0){
            if(app.selection.length > 0){
                switch(app.selection[0].constructor.name){
                    case "InsertionPoint":
                    case "Character":
                    case "Word":
                    case "TextStyleRange":
                    case "Line":
                    case "Paragraph":
                    case "TextColumn":
                    case "Text":
                    case "Cell":
                    case "Column":
                    case "Row":
                    case "Table":
                        myDisplayDialog();
    and it work for invoking the dialog box when the text frame is selected but then it only do changes in first textframe selected not in all selected....
    so i tried to experiment with this line
    if(myResult == true){
            switch(myRangeButtons.selectedButton){
                case 0:
                    myObject = app.documents.item(0);
                    break;
                case 1:
                    myObject = app.selection[0].parentStory;
                    break;
                case 2:
                    myObject = app.selection[0];
                    break;
            myDialog.destroy();
            myFindChangeByList(myObject);
        else{
            myDialog.destroy();
    by changing the number to 1 or 2 or 3 but that only told the script that if i have 2 text frame selected to do search in second text frame (incase of number 1) or if i have 3 selected and in case of numer 2 only do script in 3 text frame
    i need help please

    hello,
    after line 32 :
    var tracingPresets = app.tracingPresetsList;
    do an alert :
    alert( app.tracingPresetsList );
    it'll show you the name of the differents presets
    then line 57, call the good preset :
    t.tracing.tracingOptions.loadFromPreset('here the name of your preset');
    for expanding :
    change line 58 like that :
    t.tracing.expandTracing();
    you forget (t.) at the beginning
    best wishes for the new year

  • Passing arguments from Air to Photoshop jsx script

    I would like to invoke JavaScript file in Photoshop from my Adobe Air application. I managed to call my script with the following code:
    // Create native startup info
    nativeProcessStartupInfo = new NativeProcessStartupInfo();
    nativeProcessStartupInfo.executable = filePhotoshop; // File referencing Photoshop exe
    // Create Vector array to pass arguments
    procarg = new Vector.<String>();
    procarg.push("start");
    procarg.push(jsFileToCall);// String with path to my jsx file
    procarg.push(scriptData); // String with argument to pass to jsx file
    nativeProcessStartupInfo.arguments = procarg;
    // Create native process object for calling  executable file
    process = new NativeProcess();
    // SET ERROR HANDLERS
    process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA ,onError,false,0,true);
    process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR ,onError,false,0,true);
    process.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ERROR ,onError,false,0,true);
    process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR ,onError,false,0,true);
    process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA ,onError,false,0,true);
    // CALL NATIVE PROCESS
    process.start(nativeProcessStartupInfo);
    The Photoshop app is started, my JavaScript is invoked, but the argument is not passed into jsx.
    Is there any method how to pass arguments to script in Photoshop? (I know that I can use the file to pass the parameters, but I do not like that solution.)
    Thanks in advance for any hint.
    Zdenek M

    The only documented way I know of is programming the script as a Photoshop Plug-in that has a dialog. Then record using the script in an action.  The script will record the arguments used in its dialog into the Photoshop Actions step.  Then when the action is used played the action recorded arguments are retrived and the script bypasses displaying its dialog. 
    However In CS3 I looked at Adobe Photoshop  Image Processor JavaScript it internaly used the Fit Image Plug-in Script and passed the width and hight to it. So it is posible to pass arguments from one JSX to an JSX Plug-in Script.
    From CS5 "Image Processor.jsx"
    // use the fit image automation plug-in to do this work for me
    function FitImage( inWidth, inHeight ) {
              if ( inWidth == undefined || inHeight == undefined ) {
                        alert( strWidthAndHeight );
                        return;
              var desc = new ActionDescriptor();
              var unitPixels = charIDToTypeID( '#Pxl' );
              desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
              desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
              var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );
              executeAction( runtimeEventID, desc, DialogModes.NO );
    If You can write a file from Adobe Air you could also write the jsx file to pass the args you want to pass a to plug-in script via the ActionManager.

Maybe you are looking for

  • Organizing iPhoto '09 photos by year

    Hello, Can I get iPhoto 09 to group all my photos (about 10,000) by year, so that I end up with pics by year? I see that I can create a Smart Album to populate with pics taken on a specific day, but I don't see how to get it to do a full specific cal

  • Trying to dynamic include HTML into a JSP

    All, I am trying to include an HMTL file into a JSP file. I wish to do this dymanically. So, the following is not an option: <%@ include file="relativeURL" %> So, I am forced to resort to such measures as the following: <jsp:include page="<%=myPath%>

  • Do SSD's have to 'warm-up' ?

    Hello, I purchased a Macbook Pro Core 2 Duo 2.4GHz 17" 4GB RAM, 160GB Hard drive (see below) http://www.everymac.com/systems/apple/macbook_pro/stats/macbook-pro-core-2-duo-2 .4-17-santa-rosa-specs.html I intentionally purchased the older machine, out

  • Generic instance maker and class definition in separate files - problem

    file: genericinstantiator.java package testGenericInstantiator; public final class GenericInstantiator {      public <T> T makeInstance(Class<T> c) {           T instance = null;           try {                instance = c.newInstance();           }

  • How can i enable ldap service in my system?

    How can i enable ldap service in my system?while running my prgram i am getting an error connection refused why?