Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: SaveAs PBM

$
0
0

Thanks for the idea.

Yes. I did try that.

The problem I run into there is getting the filename of the current document changed to save to the correct file.

I can alter the path (C:\\Users\\len\\Desktop), but not the filename, by analyzing the generated script code (below).

 

Here's what it output:

 

var idsave = charIDToTypeID( "save" );

    var desc2 = new ActionDescriptor();

    var idAs = charIDToTypeID( "As  " );

    desc2.putString( idAs, """Portable Bit Map""" );

    var idIn = charIDToTypeID( "In  " );

    desc2.putPath( idIn, new File( "C:\\Users\\len\\Desktop" ) );

    var idDocI = charIDToTypeID( "DocI" );

    desc2.putInteger( idDocI, 37 );

    var idCpy = charIDToTypeID( "Cpy " );

    desc2.putBoolean( idCpy, true );

    var idsaveStage = stringIDToTypeID( "saveStage" );

    var idsaveStageType = stringIDToTypeID( "saveStageType" );

    var idsaveBegin = stringIDToTypeID( "saveBegin" );

    desc2.putEnumerated( idsaveStage, idsaveStageType, idsaveBegin );

executeAction( idsave, desc2, DialogModes.NO );


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>