• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Modify the Script in Layer

Participant ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

Script Can't Run in Adove Photoshop CS3

 

var sourceFile= new File(path);
var idPlc = charIDToTypeID( "Plc " );
var desc3 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
desc3.putPath( idnull, sourceFile);
var idFTcs = charIDToTypeID( "FTcs" );
var idQCSt = charIDToTypeID( "QCSt" );
var idQcsa = charIDToTypeID( "Qcsa" );
desc3.putEnumerated( idFTcs, idQCSt, idQcsa );
executeAction( idPlc, desc3, DialogModes.NO );

TOPICS
Actions and scripting

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

If you want to run that script in a newer version on Photoshop, use scriptListener and rerecord the place command.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

@r-bin  Please Modify the code for CS3

var sourceFile= new File(path);
var idPlc = charIDToTypeID( "Plc " );
var desc3 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
desc3.putPath( idnull, sourceFile);
var idFTcs = charIDToTypeID( "FTcs" );
var idQCSt = charIDToTypeID( "QCSt" );
var idQcsa = charIDToTypeID( "Qcsa" );
desc3.putEnumerated( idFTcs, idQCSt, idQcsa );
executeAction( idPlc, desc3, DialogModes.NO );

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

Why don't you do it yourself with ScriptListener you can use in CS3?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

Yes < I have created this "Place Command"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

The path variable is not defined.

Do not use such a name ("path") for variable outside the function.

Everything works in CS3.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

I put the path But, Path is not access

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

@Kukurykus @r-bin @Chuck Uebele 

One Problem of Place Command, I put Verticle Image, Place command have automatic rotate the image

 

Step 1:- Put the Verticle image in Place Command

Step 2:- Image will Rotated in Photoshop CS3

 

ty.JPG

 

 

#target photoshop
//
// Place.jsx
//

//
// Generated Wed Jun 23 2021 03:22:54 GMT+0530
//

cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };

//
//==================== Open ==============
//
var file=new File("~/Desktop/New folder (4)/as.jpg");
function Open() {
// Place
function step1(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
desc1.putPath(cTID('null'), file);
desc1.putEnumerated(cTID('FTcs'), cTID('QCSt'), sTID("QCSAverage"));
var desc2 = new ActionDescriptor();
desc2.putUnitDouble(cTID('Hrzn'), cTID('#Pxl'), 0);
desc2.putUnitDouble(cTID('Vrtc'), cTID('#Pxl'), 0);
desc1.putObject(cTID('Ofst'), cTID('Ofst'), desc2);
executeAction(cTID('Plc '), desc1, dialogMode);
};

step1(); // Place
};

 

//=========================================
// Open.main
//=========================================
//

Open.main = function () {
Open();
};

Open.main();

// EOF

"Place.jsx"
// EOF

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

What is its orientation in Windows, is it displayed the way it is placed or as portrait already? Anyway you may read original orientation by script before placing an image and recalculate it during placing. Just browse for appropriate thread on this forum.

 

If all your files are rotated to left and you want them to be portrait after placing, then record by ScriptListener rotation during placing, so it's going to be placed the way you like.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 22, 2021 Jun 22, 2021

Copy link to clipboard

Copied

Step 1:- Put the Verticle image in Place Command

Step 2:- Image will Rotated in Photoshop CS3

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Place has a complex implementation its not straight  forward like Copy paste or duplicate layers or drag a layer between documents where the image pixels are  simply replicated.  It can be quite trick dealing with a smart object's layers bounds.

 

Places creates a harden object from the files beings placed in.  It has the Images files actual pixels.  These Pixels can not be changed by  Photoshop tools.   These Pixels are not the Smart object layers  pixels and the size of the smart layers bounds may be quite different.  There ate two scaling that may be made during Place,  How the harden pixels are rendered depends on the Placed image file type. RAW is via ACR, Vector files via import and Photoshop supported files types by Photoshop.   Image Rotation may depend on how Photoshop supported the Files meta data rotating  data.  All Smart object layers have am Object transform recorded in the layer's data that is use to render the layers pixels from the hardened object pixels.  Therefore it is quite likely the Smart object layers bounds is not the size of the smart object Image size.  A user can also add warping to the smart object layers object transform which can effect the layers bounds.

 

Resizing a Smart object layer can be complex.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

How to perfect place command in photoshop cs3 , In Photoshop CC Version is working fine, But In case CS3 is not support to Place Command Properly !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 24, 2021 Jun 24, 2021

Copy link to clipboard

Copied

Why is not Working Place in Photoshop CS3, How to do this

Please Help me Sir !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 24, 2021 Jun 24, 2021

Copy link to clipboard

Copied

del

...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 24, 2021 Jun 24, 2021

Copy link to clipboard

Copied

Ignoring the orientation tag when executing the Place command in CS3 in action (or in a script) in DialogModes.NO mode is most likely a bug. Use a more recent Photoshop like CS6.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 25, 2021 Jun 25, 2021

Copy link to clipboard

Copied

is that possible to proper work of place command in cs3, can you send it proper orientation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 25, 2021 Jun 25, 2021

Copy link to clipboard

Copied

Maybe this old thread will help:

 

Disable (or detect) automatic orientation rotation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 25, 2021 Jun 25, 2021

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 25, 2021 Jun 25, 2021

Copy link to clipboard

Copied

LATEST

Does't working ?

EXIF = function EXIF(obj) {
if (obj.typename == "Document") {
this.exif = obj.info.exif;
} else {
this.exif = obj;
}
this.caseSensitive = false; // if needed
};
EXIF.prototype.get = function(tag) {
var exif = this.exif;

for (var i = 0; i < exif.length; i++) {
var name = exif[0];
if (name == tag) {
return exif[1];
}
}

if (!this.caseSensitive) {
tag = tag.toLowerCase().replace(/\s/g, '');

for (var i = 0; i < exif.length; i++) {
var name = exif[0];
name = name.toLowerCase().replace(/\s/g, '');
if (name == tag) {
return exif[1];
}
}
}

return '';
};

// Usage

var exif = new EXIF(app.activeDocument);

var orientation = exif.get('Orientation');

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines