Syntax to save as PCX

What is the scripting syntax (ideally, VBscript) to save a photoshop file as PCX? I could not find a SaveAs object for it like there is for TIF or JPG.

Actually …
DOM code may look cleaner and to me it is certainly more easy to understand but it is not necessarily more direct.
If you want to test this you can measure the time the same series of operations takes in DOM and in AM – usually DOM is slower (not always, though).

Similar Messages

  • Save as PCX

    I'm currently work with an old script I found here on the forums. Originally found here: http://forums.adobe.com/thread/488255
    I've toyed with it a bit but to no avail, since I have no idea what I am doing.
    Basically I want one of the output options to be .PCX format.
    #target photoshop
    function main(){
    var LSets = activeDocument.layerSets.length;
    var ArtLayers = activeDocument.artLayers.length;
    var NoOfLayers = activeDocument.layers.length;
    var Back = hasBackground();
    var hasTop = false;
    var selLayers =getSelectedLayersIdx();
    var selGroups=[];
    if(LSets>0){
        for(var s in selLayers){
       if(isLayerSet(selLayers[s])) selGroups.push(selLayers[s]);
    if(activeDocument.layers[0].typename == 'ArtLayer') hasTop = true;
    var win = new Window('dialog','Layer Saver');
    g = win.graphics;
    var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, [0.99, 0.99, 0.99, 1]);
    g.backgroundColor = myBrush;
    win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"});
    win.p1.preferredSize=[500,20];
    win.g1 = win.p1.add('group');
    win.g1.orientation = "row";
    win.title = win.g1.add('statictext',undefined,'Layer Saver');
    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 = "column";
    win.g5.alignChildren='left';
    win.g5.spacing=0;
    if(LSets == 0){
    win.g5.rb1 = win.g5.add('radiobutton',undefined,'Save selected layers');
    win.g5.rb2 = win.g5.add('radiobutton',undefined,'Save selected layers along with the top layer');
    win.g5.rb3 = win.g5.add('radiobutton',undefined,'Save selected layers along with background layer');
    win.g5.rb4 = win.g5.add('radiobutton',undefined,'Save all layers');
    win.g5.rb5 = win.g5.add('radiobutton',undefined,'Save all layers along with the top layer');
    win.g5.rb6 = win.g5.add('radiobutton',undefined,'Save all layers along with background layer');
    win.g5.rb3.enabled=Back;
    win.g5.rb6.enabled=Back;
    win.g5.rb4.value=true;
    }else{
    win.g5.rb1 = win.g5.add('radiobutton',undefined,'Save selected layerSets');
    win.g5.rb2 = win.g5.add('radiobutton',undefined,'Save selected layerSets along with the top layer');
    win.g5.rb3 = win.g5.add('radiobutton',undefined,'Save selected layerSets along with background layer');
    win.g5.rb4 = win.g5.add('radiobutton',undefined,'Save all layerSets');
    win.g5.rb5 = win.g5.add('radiobutton',undefined,'Save all layerSets along with the top layer');
    win.g5.rb6 = win.g5.add('radiobutton',undefined,'Save all layerSets along with background layer');
    win.g5.rb3.enabled=Back;
    win.g5.rb6.enabled=Back;
    win.g5.rb2.enabled=hasTop;
    win.g5.rb5.enabled=hasTop;
    if(selGroups.length <1){
        win.g5.rb1.enabled=false;
        win.g5.rb2.enabled=false;
        win.g5.rb3.enabled=false;
    win.g5.rb4.value=true;
    win.p2 = win.add("panel", undefined, undefined, {borderStyle:"black"});
    win.p2.preferredSize=[500,20];
    win.p2.st1 = win.p2.add('statictext',undefined,'Output details');
    win.p2.st1.graphics.font = ScriptUI.newFont("Tahoma", "Bold", 18);
    win.g10 =win.p2.add('group');
    win.g10.orientation = "row";
    win.g10.alignment='left';
    win.g10.et1 = win.g10.add('edittext');
    win.g10.et1.preferredSize=[350,20];
    win.g10.bu1 = win.g10.add('button',undefined,'Select Folder');
    win.g10.bu1.onClick=function(){
    var Folder1 = Folder(app.activeDocument.path);
    outputFolder = Folder.selectDialog("Please select the output folder",Folder1);
    if(outputFolder !=null){
      win.g10.et1.text =  decodeURI(outputFolder.fsName);
    win.g12 =win.p2.add('group');
    win.g12.orientation = "row";
    win.g12.alignment='left';
    win.g12.cb1 = win.g12.add('checkbox',undefined,'Merge Visible Layers?');
    win.g12.cb2 = win.g12.add('checkbox',undefined,'Trim Layer');
    win.g15 =win.p2.add('group');
    win.g15.orientation = "row";
    win.g15.alignment='left';
    var Options= ["Layer/Group Name","FileName + Sequence No.","FileName + Layer/Group Name ","User Defined with Sequence No."];
    win.g15.st1 = win.g15.add('statictext',undefined,'Save Options..');
    win.g15.dd1 = win.g15.add('dropdownlist',undefined,Options);
    win.g15.dd1.selection=0;
    win.g15.et1 = win.g15.add('edittext');
    win.g15.et1.preferredSize=[150,20];
    win.g15.et1.hide();
    win.g15.dd1.onChange=function(){
      if(this.selection.index==3){
          win.g15.et1.show();
          }else{
              win.g15.et1.hide();
    win.g18 =win.p2.add('group');
    win.g18.orientation = "row";
    win.g18.st1 = win.g18.add('statictext',undefined,'Save as :');
    var Types = ["PNG","PCX","PSD","PDF","TIF","JPG"];
    win.g18.dd1 = win.g18.add('dropdownlist',undefined,Types);
    win.g18.dd1.selection = 0;
    win.g18.alignment='left';
    win.g20 =win.p2.add('group');
    win.g20.orientation = "row";
    win.g20.bu1 = win.g20.add('button',undefined,'Process');
    win.g20.bu1.preferredSize=[200,35];
    win.g20.bu2 = win.g20.add('button',undefined,'Cancel');
    win.g20.bu2.preferredSize=[200,35];
    win.g20.bu1.onClick=function(){
        if(win.g10.et1.text == ''){
            alert("No Output Folder has been Selected!");
            return;
        if(win.g15.dd1.selection.index==3){
            if(win.g15.et1.text ==''){
                alert("No FileName Has Been Entered!");
                return;
        win.close(1);
    Process();
    win.center();
    win.show();
    function Process(){
    if(LSets == 0){
    //Process layers only
    if(win.g5.rb1.value){//Save selected layers
    for(var b in selLayers){
        selectLayerByIndex(Number(selLayers[b]));
         var lName = activeDocument.activeLayer.name;
        var saveFile= File(outputFolder+ "/" + getName(b,lName));
        dupLayers();
        if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
         if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save selected layers
    if(win.g5.rb2.value){//Save selected layers along with the top layer
    for(var b in selLayers){
        selectLayerByIndex(Number(selLayers[b]));
         var lName = activeDocument.activeLayer.name;
        activeDocument.activeLayer= activeDocument.layers[0];
        selectLayerByIndex(Number(selLayers[b]),true);
        var saveFile= File(outputFolder+ "/" + getName(b,lName));
        dupLayers();
        if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save selected layers along with the top layer
    if(win.g5.rb3.value){//Save selected layers along with background layer
        for(var b in selLayers){
        selectLayerByIndex(Number(selLayers[b]));
         var lName = activeDocument.activeLayer.name;
        activeDocument.activeLayer = activeDocument.layers[activeDocument.layers.length-1];
        selectLayerByIndex(Number(selLayers[b]),true);
        var saveFile= File(outputFolder+ "/" + getName(b,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save selected layers along with background layer
    if(win.g5.rb4.value){//Save all layers
    selectAllLayers();
    selLayers =getSelectedLayersIdx();
    for(var b in selLayers){
         selectLayerByIndex(Number(selLayers[b]));
         var lName = activeDocument.activeLayer.name;
        var saveFile= File(outputFolder+ "/" + getName(b,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save all layers
    if(win.g5.rb5.value){//Save all layers along with the top layer
    selectAllLayers(1);
    selLayers =getSelectedLayersIdx();
    for(var b in selLayers){
        selectLayerByIndex(Number(selLayers[b]));
         var lName = activeDocument.activeLayer.name;
        activeDocument.activeLayer = activeDocument.layers[0];
        selectLayerByIndex(Number(selLayers[b]),true);
        var saveFile= File(outputFolder+ "/" + getName(b,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save all layers along with the top layer
    if(win.g5.rb6.value){//Save all layers along with background layer
    selectAllLayers();
    selLayers =getSelectedLayersIdx();
        for(var b in selLayers){
        selectLayerByIndex(Number(selLayers[b]));
         var lName = activeDocument.activeLayer.name;
        activeDocument.activeLayer = activeDocument.layers[activeDocument.layers.length-1];
        selectLayerByIndex(Number(selLayers[b]),true);
        var saveFile= File(outputFolder+ "/" + getName(b,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save all layers along with background layer
        }else{
    //Process LayerSets Only
    if(win.g5.rb1.value){//Save selected layerSets
        for(var g in selGroups){
            selectLayerByIndex(Number(selGroups[g]));
            var lName = activeDocument.activeLayer.name;
            var saveFile= File(outputFolder+ "/" + getName(g,lName));
            dupLayers();
                if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
       }//End Save selected layerSets
    if(win.g5.rb2.value){//Save selected layerSets along with the top layer
        for(var g in selGroups){
            selectLayerByIndex(Number(selGroups[g]));
         var lName = activeDocument.activeLayer.name;
        activeDocument.activeLayer= activeDocument.layers[0];
        selectLayerByIndex(Number(selGroups[g]),true);
        var saveFile= File(outputFolder+ "/" + getName(g,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save selected layerSets along with the top layer
    if(win.g5.rb3.value){//Save selected layerSets along with background layer
        for(var g in selGroups){
        selectLayerByIndex(Number(selGroups[g]));
         var lName = activeDocument.activeLayer.name;
        activeDocument.activeLayer = activeDocument.layers[activeDocument.layers.length-1];
        selectLayerByIndex(Number(selGroups[g]),true);
        var saveFile= File(outputFolder+ "/" + getName(g,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save selected layerSets along with background layer
    if(win.g5.rb4.value){//Save all layerSets
        for(var g =0;g<LSets;g++){
             activeDocument.activeLayer = activeDocument.layerSets[g];
             var lName = activeDocument.activeLayer.name;
             var saveFile= File(outputFolder+ "/" + getName(g,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save all layerSets
    if(win.g5.rb5.value){//Save all layerSets along with the top layer
        activeDocument.activeLayer = activeDocument.layers[0];
        var TopIDX =getSelectedLayersIdx();
         for(var g =0;g<LSets;g++){
             activeDocument.activeLayer = activeDocument.layerSets[g];
             var lName = activeDocument.activeLayer.name;
             selectLayerByIndex(Number(TopIDX[0]),true);
             var saveFile= File(outputFolder+ "/" + getName(g,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save all layerSets along with the top layer
    if(win.g5.rb6.value){//Save all layerSets along with background layer
             for(var g =0;g<LSets;g++){
             activeDocument.activeLayer = activeDocument.layerSets[g];
             var lName = activeDocument.activeLayer.name;
             selectLayerByIndex(0,true);
             var saveFile= File(outputFolder+ "/" + getName(g,lName));
        dupLayers();
            if(win.g12.cb1.value){
            try{activeDocument.mergeVisibleLayers();}catch(e){}
        if(win.g12.cb2.value){
             try{activeDocument.trim(TrimType.TRANSPARENT,true,true,true,true);}catch(e){}
        SaveDOC(saveFile);
        app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
        }//End Save all layerSets along with background layer
    function getName(seq,lName){
    seq = zeroPad((Number(seq)+1), 3);
    var dName = decodeURI(activeDocument.name).replace(/\.[^\.]+$/, '');
    var Name ='';
    switch (Number(win.g15.dd1.selection.index)){
        case 0: Name += lName; break;
        case 1: Name += dName +"-"+seq; break;
        case 2: Name += dName +"-"+ lName; break;
        case 3: Name += win.g15.et1.text + "-"+seq; break;
        default :break;
    return Name;
    function SaveDOC(saveFile){
        switch(Number(win.g18.dd1.selection.index)){
            case 0 : SavePNG(File(saveFile+".png")); break;
            case 1 : SavePCX(File(saveFile+".pcx")); break;
            case 2:  SavePSD(File(saveFile+".psd")); break;
            case 3:  SavePDF(File(saveFile+".pdf")); break;
            case 4:  SaveTIFF(File(saveFile+".tif")); break;
            case 5:  SaveJPG(File(saveFile+".jpg"),12); break;
            default : break;
    main();
    function hasBackground() {
       var ref = new ActionReference();
       ref.putProperty( charIDToTypeID("Prpr"), charIDToTypeID( "Bckg" ));
       ref.putEnumerated(charIDToTypeID( "Lyr " ),charIDToTypeID( "Ordn" ),charIDToTypeID( "Back" ));
       var desc =  executeActionGet(ref);
       var res = desc.getBoolean(charIDToTypeID( "Bckg" ));
       return res   
    function getSelectedLayersIdx(){
          var selectedLayers = new Array;
          var ref = new ActionReference();
          ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
          var desc = executeActionGet(ref);
          if( desc.hasKey( stringIDToTypeID( 'targetLayers' ) ) ){
             desc = desc.getList( stringIDToTypeID( 'targetLayers' ));
              var c = desc.count
              var selectedLayers = new Array();
              for(var i=0;i<c;i++){
                try{
                   activeDocument.backgroundLayer;
                   selectedLayers.push(  desc.getReference( i ).getIndex() );
                }catch(e){
                   selectedLayers.push(  desc.getReference( i ).getIndex()+1 );
           }else{
             var ref = new ActionReference();
             ref.putProperty( charIDToTypeID("Prpr") , charIDToTypeID( "ItmI" ));
             ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
             try{
                activeDocument.backgroundLayer;
                selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" ))-1);
             }catch(e){
                selectedLayers.push( executeActionGet(ref).getInteger(charIDToTypeID( "ItmI" )));
          return selectedLayers;
    function isLayerSet(idx) {        
       var ref = new ActionReference();
       ref.putIndex(1283027488, idx);
       var desc =  executeActionGet(ref);
       var type = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
       var res = typeIDToStringID(type);
       if(res == 'layerSectionStart') return true;
           return false;  
    function dupLayers() {
        var desc143 = new ActionDescriptor();
            var ref73 = new ActionReference();
            ref73.putClass( charIDToTypeID('Dcmn') );
        desc143.putReference( charIDToTypeID('null'), ref73 );
        desc143.putString( charIDToTypeID('Nm  '), activeDocument.activeLayer.name );
            var ref74 = new ActionReference();
            ref74.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc143.putReference( charIDToTypeID('Usng'), ref74 );
        executeAction( charIDToTypeID('Mk  '), desc143, DialogModes.NO );
    function selectLayerByIndex(index,add){
    add = (add == undefined)  ? add = false : add;
    var ref = new ActionReference();
        ref.putIndex(charIDToTypeID("Lyr "), index);
        var desc = new ActionDescriptor();
        desc.putReference(charIDToTypeID("null"), ref );
           if(add) desc.putEnumerated( stringIDToTypeID( "selectionModifier" ), stringIDToTypeID( "selectionModifierType" ), stringIDToTypeID( "addToSelection" ) );
          desc.putBoolean( charIDToTypeID( "MkVs" ), false );
       try{
        executeAction(charIDToTypeID("slct"), desc, DialogModes.NO );
    }catch(e){}
    function selectAllLayers(layer) {//does not select background layer
    if(layer == undefined) layer = 0;
    activeDocument.activeLayer = activeDocument.layers[activeDocument.layers.length-1];
    if(activeDocument.activeLayer.isBackgroundLayer)
    activeDocument.activeLayer = activeDocument.layers[activeDocument.layers.length-2];
    var BL = activeDocument.activeLayer.name;
    activeDocument.activeLayer = activeDocument.layers[layer];
        var desc5 = new ActionDescriptor();
            var ref3 = new ActionReference();
            ref3.putName( charIDToTypeID('Lyr '), BL);
        desc5.putReference( charIDToTypeID('null'), ref3 );
        desc5.putEnumerated( stringIDToTypeID('selectionModifier'), stringIDToTypeID('selectionModifierType'), stringIDToTypeID('addToSelectionContinuous') );
        desc5.putBoolean( charIDToTypeID('MkVs'), false );
        executeAction( charIDToTypeID('slct'), desc5, DialogModes.NO );
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;
    function SavePNG(saveFile){
    pngSaveOptions = new PNGSaveOptions();
    activeDocument.saveAs(saveFile, pngSaveOptions, true, Extension.LOWERCASE);
    function SavePCX(saveFile){
    pcxSaveOptions = new PCXSaveOptions();
    activeDocument.saveAs(saveFile, pcxSaveOptions, true, Extension.LOWERCASE);
    function SaveTIFF(saveFile){
    tiffSaveOptions = new TiffSaveOptions();
    tiffSaveOptions.embedColorProfile = true;
    tiffSaveOptions.alphaChannels = true;
    tiffSaveOptions.layers = true;
    tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
    activeDocument.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE);
    function SavePSD(saveFile){
    psdSaveOptions = new PhotoshopSaveOptions();
    psdSaveOptions.embedColorProfile = true;
    psdSaveOptions.alphaChannels = true; 
    activeDocument.saveAs(saveFile, psdSaveOptions, true, Extension.LOWERCASE);
    function SavePDF(saveFile){
    pdfSaveOptions = new PDFSaveOptions();
    activeDocument.saveAs(saveFile, pdfSaveOptions, true, Extension.LOWERCASE);
    function SaveJPG(saveFile, jpegQuality){
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.embedColorProfile = true;
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.quality = jpegQuality; //1-12
    activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);
    I purely guessed that this was the line of script to save as a PCX file but it didn't work upon execution. It isolates a group to save but then just stops.
    function SavePCX(saveFile){
    pcxSaveOptions = new PCXSaveOptions();
    activeDocument.saveAs(saveFile, pcxSaveOptions, true, Extension.LOWERCASE);
    I've been looking everywhere for an answer, but it seems like not one has ever had to have a script like this. I'm running CS6 of that helps.

    c.pfaffenbichler wrote: Where in the documentation did you find the class PCXSaveOptions? I can’t find it in ESTK’s Object Model Viewer.
    I'm not familiar with this coding whatsoever, so I just guessed based on PNG's save function. I copy pasted and guessed hoping it would work.
    c.pfaffenbichler wrote:
    I guess you should record a PCX-save with ScriptingListener.plugin and then use the resulting Action Manager-code wrapped in a function.
    I used the recommended plugin and got this in the log:
    var idsave = charIDToTypeID( "save" );
        var desc2 = new ActionDescriptor();
        var idAs = charIDToTypeID( "As  " );
        desc2.putString( idAs, """PCX""" );
        var idIn = charIDToTypeID( "In  " );
        desc2.putPath( idIn, new File( "Y:\\RSP001.pcx" ) );
        var idDocI = charIDToTypeID( "DocI" );
        desc2.putInteger( idDocI, 314 );
        var idsaveStage = stringIDToTypeID( "saveStage" );
        var idsaveStageType = stringIDToTypeID( "saveStageType" );
        var idsaveBegin = stringIDToTypeID( "saveBegin" );
        desc2.putEnumerated( idsaveStage, idsaveStageType, idsaveBegin );
    executeAction( idsave, desc2, DialogModes.NO );
    I have no clue what I am looking for.

  • Save targa, pcx files in photoshop E.13. (testversion).

    hello, i've downloaded the testversion of photoshop elements 13. could it be that there are no possibility to save targa or pcx files in the testversion? there are only 9 selectable types, but no targa or pcx. i work mostly with them and i need to know, if this problem will be solved if i buy the product? thanks a lot for your answers

    Hi,
    There is no difference in functionality between the trial version and an activated purchased version.
    I think you will need the full blown Photoshop not the cut down elements version.
    Brian

  • Trouble with saveAS

    I am having a problem with a javascript function. <br /><br />I can save as a Tiff with no problem - <br />but now I would like to have another option that allows my users to save data as a PDF file. <br /><br />I can't seem to get it to work for a PDF file. <br /><br />The save as TIFF syntax - works fine ..  <br />CODE SNIPPET HERE !<br /><this.saveAsFile,"com.adobe.acrobat.tiff"); ><br /><br />I have tried leaving out a conversion that doesn't work . <br />I have tried preflight conversions - they don't work - bcause the preflight dll is non-existent . <br /><br />is there an easy solution that I am overlooking ?

    Well, the syntax for saveAs in Acrobat JavaScript is actually
    this.saveAs(path, conversionID)
    So try that syntax, unless you have a folder-level function defining "saveAsFile", in which case we'd need to see that function to know what's going on.

  • How can I read *.pcx Image ?

    Hello!
    Now, I want to read and save pcx image.
    I use jimi1_0 and its sample that name is JimiBrowserApp.
    I load jpg image, and I can save as pcx image.
    But, then, I try to read the same pcx image, I can't.
    why?
    Do you have any idea ?
    please help.

    Hello,
    Once I thought that I could solve a problem.
    I use PcxReader,
    http://www.burgsoft.com/PcxReader/
    I can read pcx image of 256colors, fullcolor, grayscale...
    But I can't read pcx image of 2colors(black and white).
    help

  • Jacob - save outlook message as .msg file

    Hi,
    I need to save an outlook mail item as a .msg file using Jacob.
    In C# I would use the syntax
    mail.SaveAs(savePathAndName, Outlook.OlSaveAsType.olMSG) where 'mail' is an outlook mailitem, the first parameter is a string and the second parameter is a type.
    In Jacob I've tried various combinations of
    Variant saveResult = Dispatch.call(mailItem, "SaveAs", "Microsoft.Office.Interop.Outlook.OlSaveAsType.olMSG");
    with no success
    Any ideas?
    tvm
    RCF

    Variant saveResult = Dispatch.call(mailItem, "SaveAs", directory + "newEmailName.msg");
    thanks you, i found it because of you :)

  • Flat File to IDOC Scenario

    I am working on the following scenario:
    Flat CSV orders file to a Orders IDOC.
    The input file has data like
    a,b,c,d,e,f,g,h...
    a,b,c,d,e,f,g,h...
    We need to generate ONE IDOC per file. The complexity lies in the mapping.
    The segments generated in the IDOC and the number of times they are generated all depends on the values of a,b and c and the segment fields are mapped to values either from the file or mapped to some constants or are figured out based on some logic depending upon what value a,b or c has and what range of values c has.
    Overall, quite a complex mapping.
    The way I am trying to work is:
    1. Create Outbound MI ABC based on the File Structure:
    <Record> 0 to unbounded
    <a></a> 1..1
    <b></b> 1..1
    <c></c> 1..1
    2. Do file content conversion in Sender File adapter.
    3. Import the Orders02 idoc in the IR.
    4.Create a message mapping with ABC as source and Orcers02 IDOC as target.
    5. Now with mapping, I am trying to use createif for every IDOC segment node. The logic is to create this node if the condition is true ( i.e a=somevalue else do not create).I am definig UDF for evaluating these conditions.
    6. Then I map the fields of the generated segment node to either the values from the source or some values generated by UDFs based on some criteria.
    I am still in the mapping phase and I just wanted to know if this was a correct approach to acheive this. So far, I am mapping one node and when I check in the output it works okay.
    My question is :
    1. I would end up using lots of UDFs for every input record and for every record of input, each UDF will be called again and again.
    2. Does anyone know of any better approach to achieve this?
    3. If a segment appears more than one time, let us say generate segment E1TDK01 if a=1, and a could be 1 in multiple records that means generating multiple E1TDK01 segments, is there anything that needs to be taken care of? I see in the target structure that this segment can occur 0 to 99 times, so will this segment be generated 5 times if my file had a=1 in 5 records?
    Please help me understand this and any pointers to existing weblogs will also be appreciated.

    Hi,
    Try this and this should resolve your issue:
    1. Import IDOC into repository
    2. After import, download the wsdl of the imported IDOc into your file system
    3. Open the wsdl and insert code at the IDOC tag ===> minOccurs=0, maxOccurs=unbounded (Pl follow correct syntax, I may not be right on syntax)
    4. save the file
    5. imported the modified wsdl  into repository and use this one in the message mapping
    6. In message mapping, messages tab change the occurances to 0 to Unbounded for the modified wsdl IDOC
    7. Do the same thing in interface mapping
    Hope this helps.
    TNV

  • How do we create Explicit enhancement ?

    Hi All,
    How do we create Explicit enhancement, when we dont have any enhancement point or section in SAP source code.
    Note: I know how to Implement point or section ..... but i like to know how can we create.
    Thanks
    A

    Hi,
    For your reference, let's see how to enhance a standard SAP program using an Implicit Enhancement
    Option.
    Let us use program RSFTP002 u2013 Itu2019s a program used to test FTP connections.
    In this example, we will unmask the currently masked password field.
    Open the program in the ABAP Editor (SE38).
    Execute it to bring up the parameter list.
    Note the asterisks in the Password field.
    To view the places where we can implement these enhancements, go back to the previous page (the one
    containing the code) and click on the Enhance button (before the Syntax Check button) or press Shift + F4.
    Note: Enhancement options are only present in SAP WAS 7.0 and above.
    Then Navigate to Edit -> Enhancement Operations -> Show Implicit Enhancement Options.
    You will be shown the places where Implicit Enhancement Options are present,
    There will be two such spots in this particular program u2013 One at the end of the result table definition and the other at the end of the program.
    To implement an enhancement option, right click in the orange area -> Enhancement Implementation -> Create.
    Choose an enhancement name (ZFTP_PWD in this case), give it a description and if needed a Composite Enhancement Implementation name and press enter.
    Save it as a local object or in a package (as the case might be).
    In this example, we shall change the visibility of the password field and show the password. This is done by looping at the screen and changing the invisible parameter of the PWD field to u20180u2019.
    Once the Enhancement Implementation is created, the following code is inserted into the program,
    $$-Start: (2)----
    ENHANCEMENT 1 ZFTP_PWD.
    ENDENHANCEMENT.
    $$-End: (2)----
    ZFTP_PWD is the name of the implementation that we gave.
    1 indicates that this is the first implementation in this program.
    We can put out code inside the ENHANCEMENTu2026ENDENHANCEMENT block as shown below.
    Follow the usual procedure of Syntax Check, Save and Activate.
    Now execute the program again to see the parameter list.
    Note that anything typed in the Password field is now visible.
    Hope this surely help u..

  • CM02 Tansaction enhancement

    Hi,
    In CM02 transaction there are few place holders for customized user data like user date 1, user qty.We have cutomized iw31 & iw32 T-codes with a new custom date filed which would be getting stored in AUFK table .
    I want to map that cutomized filed with user date 1 filed of CM02 transaction.
    Kindly provide your suggestion in acheiving this?

    Hi,
    For your reference, let's see how to enhance a standard SAP program using an Implicit Enhancement
    Option.
    Let us use program RSFTP002 u2013 Itu2019s a program used to test FTP connections.
    In this example, we will unmask the currently masked password field.
    Open the program in the ABAP Editor (SE38).
    Execute it to bring up the parameter list.
    Note the asterisks in the Password field.
    To view the places where we can implement these enhancements, go back to the previous page (the one
    containing the code) and click on the Enhance button (before the Syntax Check button) or press Shift + F4.
    Note: Enhancement options are only present in SAP WAS 7.0 and above.
    Then Navigate to Edit -> Enhancement Operations -> Show Implicit Enhancement Options.
    You will be shown the places where Implicit Enhancement Options are present,
    There will be two such spots in this particular program u2013 One at the end of the result table definition and the other at the end of the program.
    To implement an enhancement option, right click in the orange area -> Enhancement Implementation -> Create.
    Choose an enhancement name (ZFTP_PWD in this case), give it a description and if needed a Composite Enhancement Implementation name and press enter.
    Save it as a local object or in a package (as the case might be).
    In this example, we shall change the visibility of the password field and show the password. This is done by looping at the screen and changing the invisible parameter of the PWD field to u20180u2019.
    Once the Enhancement Implementation is created, the following code is inserted into the program,
    $$-Start: (2)----
    ENHANCEMENT 1 ZFTP_PWD.
    ENDENHANCEMENT.
    $$-End: (2)----
    ZFTP_PWD is the name of the implementation that we gave.
    1 indicates that this is the first implementation in this program.
    We can put out code inside the ENHANCEMENTu2026ENDENHANCEMENT block as shown below.
    Follow the usual procedure of Syntax Check, Save and Activate.
    Now execute the program again to see the parameter list.
    Note that anything typed in the Password field is now visible.
    Hope this surely help u..
    Rohan

  • Looping to generate 2 columnar table

    Hi all,
    First greetings to all. I am a new member of this forum and also relatively new to XSLT.
    I am trying to generate an xsl:fo file using xml document and xslt.
    now, I requre 2 columnar table looping through node in xml.
    To be precise it looks like following..
    xml file:
    <some-node>
    <node-of-interest>
    <sub-node1> val1 </sub-node1>
    </node-of-interest>
    <node-of-interest>
    <sub-node1> val2 </sub-node1>
    </node-of-interest>
    <node-of-interest>
    <sub-node1> val3 </sub-node1>
    </node-of-interest> ........
    </some-nodes>
    output required:
    |-------|----------|
    |_col1_|__col2_|
    |val1 | val2 |
    |val3 | val4 |
    |valN | |
    _______ ____|
    and i wanted to select row according to the fn:position() is even or the final node ....
    xsl logic (not written in std syntax to save time and space )
    <table>
    <xsl:for-each select="some-nodes/node-of-interest" >
    <if test="position() odd">
    <row>
    </if>
    <cell>
    <xsl:value-of select="sub-node1" />
    </cel>
    <if test="position() even or last()">
    </row>
    </if>
    </xsl:for-each>
    </table>
    this implementation fails because of incomplte <row> element !!!
    is there any other way to loop through ... may be with the step of 2 nodes ??
    ....................... any help ???
    thanks,
    Hardik

    Hi Chris,
    you need to compare your model against database - import from database into same relational model and use "swap target" option - in this case "alter statements" against database will be generated.
    You can look at demonstrations here http://www.oracle.com/technetwork/developer-tools/datamodeler/demonstrations-224554.html
    Probably this particular one will be most helpful http://download.oracle.com/otn_hosted_doc/sqldev/importddl/importddl.html
    Soon or later your changes will require table to be recreated and you'll need to backup your data - you can consider usage of "Advanced DDL" option - script will be generated that will unload the content of your table (including LOBs) to file system accessible from database and restore it after changes. Well don't try it directly on production system :).
    Philip

  • Table controls in module pool programing

    hello all,
         i am a novice in ABAP. i am not able to save the details i gave in the table control. i am giving the material number(MATNR) in a seperate text box and the fileds like ERNAM,LAEDA,AENAM in the table control. but when i am saving i am able to find only the MATNR value in the mara table.
        what is the syntax to save the values of the table control into the MARA table.
    thanks & regards,
    seenu

    HI,
      Step 1 : TO move the values from the screen to ABAP Program.
    The values of all the input fields will be available in ABAP when PAI event is triggered. To access the values in a table control, you will need to follow the below mentioned procedure....
    <b>in PAI Event
    ( ITAB is Table Control and WA_ITAB is work area)</b>
    LOOP AT ITAB INTO WA_ITAB.
    MODULE READ_SCRN_VALUES
    ENDLOOP
    MODULE READ_SCRN_VALUES INPUT
    move  WA_ITAB to WS_ITAB.
    WS_ITAB is another Work area.
    ENDMODULE
    This way you can moves from screen to ABAP Program. Pass WS_ITAB and MATNR (Matnr - material number on the screen) to MARA.
    After updating MARA Table, check the table to view the values of the required fields.
    Click the link below to know more about Passing Values from Screen to Program.
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba9e735c111d1829f0000e829fbfe/content.htm
    To know about controlling the data transfer from Screen to Program
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbabb035c111d1829f0000e829fbfe/content.htm
    Also check if you are using MODIFY or INSERT or UPDATE command in your program to update MARA Table, then click the link below to know more about these commands.
    Insert
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm
    Update
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm
    Modify
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
    Hope this answers your question.
    Regards,
    Vara

  • HT3939 creat a new id

    how can i creat a new ID stor in syria

    Simthon,
    You have to get a report reference from the current execution and call save on it.
    Save Method
    Syntax
    Report.Save ( pathString, appendIfAlreadyExists, linefeedConversion)
    Purpose
    Saves the report to the file you specify.
    Remarks
    Calling this method updates the Location property.
    Parameters
    pathString As String
    [In] Specifies the file in which to save the report.
    appendIfAlreadyExists As Boolean
    [In] Indicates whether to append or overwrite the file if it already exists. Pass True to append to the file. Pass False to overwrite it.
    linefeedConversion As ReportConversion
    [In] Specifies a linefeed conversion for the report text.
    Hope it helps.
    Best Regards.
    Antonio Lie.

  • TODAY 2pm CEST: Webseminar about the next steps of APEX ...

    The German APEX Community will hold an internet seminar TODAY at 2pm CEST.
    Marc Sewtz will talk about the current status and the next steps of APEX
    development. The webcast language will be german; the webcast will last one hour
    and attandance is free of charge. If you understand german you are hereby invited
    to this webcast.
    The german community webpage contains the login details:
    http://www.oracle.com/global/de/community/index.html
    Die deutsche APEX Community veranstaltet HEUTE um 14:00
    (MESZ) ein Internet Seminar zum Thema "APEX: Wie geht es weiter?".
    Sprecher ist Marc Sewtz vom APEX Development Team. Das Internet Seminar findet in
    deutscher Sprache statt und dauert eine Stunde. Die Teilnahme ist kostenlos.
    Einwahldetails auf der Webseite der deutschen APEX Community
    http://www.oracle.com/global/de/community/index.html

    If you want to do an paradigm shift, have some fun with C. I think it's a good candidate to teach you about imperative programming and lower-level thinking. (When people say it's glorified assembler, there's a certain point to it.)
    Sticking with Scheme I would recommend you to learn about networking and program an HTTP server. (Use HTTP/1.0 to start with.) You'll learn about text parsing, networking and as you already know HTML, it helps to broaden your knowledge. (You could write a server in C, too. http://beej.us/guide/bgnet/ is a good guide to help.)
    I started to write most of my code in Python about 2 months ago, with some Common Lisp and C sprinkled in. As all I currently do is web application programming (web.py) and Project Euler, Python serves me well to quickly express whatever idea I have. Batteries included libraries and clear syntax really save you a lot of time.
    On the other hand it's pretty slow, particularly if one doesn't know the runtime characteristics for functions. (For instance testing for membership in a list is O(n) while testing for membership in a set is O(1)...makes code a lot faster.)

  • Save style sheet failed : Transformation contains syntax error.

    Hello experts,
    We are facing a problem, your valuable suggestion can help us to solved the problem.
    Brief on system ladsacpe. We are using XI between R/3 and SRM.
    Basically we are sending PO IDoc (ORDERS02) to SRM via XI. It also successfuly passed to SRM via XI. In XI SXMB_MONI i can see the checkred flag. Now in SRM SXMB_MONI the flag becomes Red and it shows Below error when i clcik on flag.
    " Save Stylesheet failed /1SAI/TXSD5BFE2D6C24B57C0071F:   
       Transformation /1SAI/TXSD5BFE2D6C24B57C0071F contains syntax error " *
    After this error when i check XI SXMB_MONI again, the flag is chekred but Acknowledgement status has error. and the Same error i can see in XI SXMB_MONI.
    I think this error is coming when acknowleding back to XI to R/3.
    But dont know how to solved?
    Can you guys please help.
    Thanks in Advance.
    Aakash.

    Hi Aakash
    Try have a look at SAP Note Number: [1157004|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_dwb/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313537303034%7d]
    Best regards,
    Chris

  • When trying to save a document , it says syntax error-what does that mean and how do I fix it?

    when trying to save a document that I typed, it says syntax error..what does that mean and how do I fix it so I can save my documents?

    Applescript is like HTML, Actionscript, or Javascript.
    SYNTAX is EVERYTHING.
    Unlike HTML, Dreamweaver will pop a syntax error when trying to save a javascript that is unworkable because of a Syntax Error. Flash will do the same with a bad Actionscript.
    AppleScript Editor is the same way as Dreamweaver or Flash.
    The reason is:
    Bad HTML - a browser simply won't load the page or it'll load it with missing or no content. Not all that bad.
    Bad Javascript - your browser can lock up and if the script is complex enough, it can lock up your entire system.
    Bad Actionscript - just like bad javascript, it can potentially lock your entire system.
    Bad Applescript - can lock up your entire system.
    With Windows, viruses are often improperly read as SYNTAX errors in Actionscript or Javascript. That's not a worry with an AppleScript, but the possibility of locking up your system is worth a warning.
    You need to double check your syntax to be sure you haven't got something missing or improperly written.

Maybe you are looking for

  • Application crashes in Windows 7 64bit made in Labview 2010 sp1 f2 with Fault module name%3A lvrt.dll%2C version 10.0.0.4033 and exception code c0000005

    I build an application exe and then its installer along with run time environment. The installers instals the application correctly but when I try to execute the application, I get an error that application has crashed and Windows must close it down

  • Context Menu for XML

    When creating an extension, a context menu item can be added to a menu for a java file by using "instanceof oracle.jdeveloper.model.JavaSourceNode". Similarly, for jsp source you would use "oracle.jdeveloper.model.JspSourceNode". What do I use if I w

  • Cannot update or install latest version of iTunes 10.5.2

    I have iTunes running on Windows XP. I try to update to the latest version of iTunes 10.5.2, by using the menu Help / Check for update. It found the latest version 10.5.2 and download it. During the installation, it says it cannot remove the previous

  • Error trying to run Audigy 2 Value driver inst

    I recently purchased an OEM Audigy 2 value sound card that came with no driver installation CD. I have tried three times to download the drivers from the creative website and every time I have come up with this error while it is extracting: File erro

  • Deleting pages impossible (pages in use)

    I have a PDF and would like to delete one or more pages. I keep getting the message(German version) "Eine oder mehr Seiten sind in Gebrauch und können nicht gelöscht werden." Translation: One or more pages are in use and cannot be deleted. I have Ado