Bon je t en mets un pris au hazard dans ma liste de scripts :


Code:
//Nom.jsx
var docRef = activeDocument
var posHoriz = docRef.width*(75/100);    //je donne un pourcentage de la taille du document
var posVertic = docRef.height*(98/100);    //pour la position du texte

Opacite = 85 ; // reglage de la transparence du calque texte ( de 0 a 100 )

var TailleFonte = 20;

//Je rends TailleFonte proportionnel a la taille de l image :

TailleFonteW = docRef.width*(2/100); // modifier les 0.54 ( = 14 px pour 3888 px )

TailleFonteH = docRef.height*(1/100);

if ( docRef.width>docRef.heigth ) // Portrait ou paysage
{
  TailleFonte =  TailleFonteW 
}
else
{
  TailleFonte =  TailleFonteH
}

var textColor = new SolidColor;
textColor.rgb.red = 0;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;
textColor.opacity = 80;
monNom = Window.prompt( 'Mettre la signature voulue !');
 

textColor.rgb.red = 0;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;
textColor.opacity = 80;
colorred = Window.prompt( 'Mettre les variables Red !');

textColor.rgb.red = 0;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;
textColor.opacity = 80;

colorgreen = Window.prompt( 'Mettre les variables Green !');

textColor.rgb.red = 0;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;
textColor.opacity = 80;

colorblue = Window.prompt( 'Mettre les variables Blue !');
textColor.rgb.red = 0;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;

textColor.opacity = 80;
coloropacity = Window.prompt( 'Mettre les variables Opacitée !');
var textColor = new SolidColor; //changer les couleurs
textColor.rgb.red = colorred;
textColor.rgb.green = colorgreen;
textColor.rgb.blue = colorblue;
textColor.opacity = coloropacity;


//alert( TailleFonte )
 

fontPostScriptName = "Wesley"; //LucidaCalligraphy-Italic
//"ParkAvenueBT-Regular" - Normal Gras ...etc

NomPolice = "Wesley"; //LucidaCalligraphy-Italic   //"ParkAvenue BT"  il faut trouver les noms postcripts des fontes.

app.displayDialogs = DialogModes.NO;
app.preferences.typeUnits = TypeUnits.POINTS;

//var textColor = new SolidColor; //changer les couleurs
var newTextLayer = docRef.artLayers.add(); // le calque de Texte
newTextLayer.kind = LayerKind.TEXT;
newTextLayer.textItem.contents = monNom;
newTextLayer.textItem.position = Array(posHoriz, posVertic);
newTextLayer.textItem.postScriptName = fontPostScriptName;
newTextLayer.textItem.font = NomPolice
newTextLayer.textItem.size = TailleFonte; 
newTextLayer.textItem.color = textColor;
newTextLayer.opacity = Opacite;
docRef.flatten();   //aplatir