Script that rotates a PNG in Photoshop?

I have the following Photoshop ExtendScript (.jsx) script which rotates the image canvas, but doesn't rotate the contents:
#target photoshop
var doc = app.open(...);       // open the .png file
if (doc.width > doc.height) {  // check if this document is landscape
  doc.rotateCanvas(90);        // rotate the canvas to portrait
  // but how to rotate the contents?
I would like to rotate the entire image, contents included. I've  tried also rotating all the document's layers, and art layers, but  nothing works.

hiltoncampbell wrote:
#target photoshop
var doc = app.open(...);       // open the .png file
if (doc.width > doc.height) {  // check if this document is landscape
  doc.rotateCanvas(90);        // rotate the canvas to portrait
  // but how to rotate the contents?
While the code look good it may not work??? You see it does not insure what ruler units is.   So if your ruler units were set to something like persent the if statement would read 
if ( 100% is greater then 100% )  rotate
I have a script like that RotatePortrait.jsx  to rotate portrait to landscape looks like this
<javascriptresource>
<about>$$$/JavaScripts/RotatePortrait/About=JJMack's Rotate Portrait.^r^rCopyright 2009 Mouseprints.^r^rScript utility for action.^rNOTE:Rotate Portrait to Landscape!</about>
<category>JJMack's Action Utility</category>
</javascriptresource>
Rotate();
function Rotate() {
// validate that a document is open
if (documents.length < 1) {
alert("No Open Document!");
return;
var orig_ruler_units = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
// Rotate portrait to landscape orientation
if (activeDocument.height > activeDocument.width) activeDocument.rotateCanvas(90);
// Reset units to original settings
app.preferences.rulerUnits = orig_ruler_units;

Similar Messages

  • How do I run a simple script that loads an image into photoshop CS - CS4?

    Hello,
    I am at a loss on how to get my simple application to work. I have a small desktop air application that simply opens Photoshop and runs an action. I used switchboard and the application ran great on PC and MAC. However it only worked for CS3, and CS4 not CS or CS2?. Plus the size of switchboard was a bit large for my small app. I am willing to live with that though . I am using Air with Flex and wanted to know if perhaps there is a beter approach? All the application does is open photoshop, loads an image, and runs an action. Can I do this for all versions of Photoshop using switchboard? Can I do this without switchboard and just use javascript. The big issue is the Air app needs to open Photoshop, and most of the examples have me open PS first and then execute a script located in the PS directory. This needs to work outside of the PS directory. Any examples are appreciated.
    I have looked at the following:
    - SwitchBoard : only works for CS3-CS4 (on my tests)
    - PatchPanel: same issue, plus seperate SDKs
    - ExtendScript: requires script to be run from PS not Air

    Hello,
    I am at a loss on how to get my simple application to work. I have a small desktop air application that simply opens Photoshop and runs an action. I used switchboard and the application ran great on PC and MAC. However it only worked for CS3, and CS4 not CS or CS2?. Plus the size of switchboard was a bit large for my small app. I am willing to live with that though . I am using Air with Flex and wanted to know if perhaps there is a beter approach? All the application does is open photoshop, loads an image, and runs an action. Can I do this for all versions of Photoshop using switchboard? Can I do this without switchboard and just use javascript. The big issue is the Air app needs to open Photoshop, and most of the examples have me open PS first and then execute a script located in the PS directory. This needs to work outside of the PS directory. Any examples are appreciated.
    I have looked at the following:
    - SwitchBoard : only works for CS3-CS4 (on my tests)
    - PatchPanel: same issue, plus seperate SDKs
    - ExtendScript: requires script to be run from PS not Air

  • I want to know how to create a new script that can be run in batch proces in Photoshop Element 11 ?

    I want to know how to create a new script that can be run in batch proces in Photoshop Element 11 ?

    Have a look at the menu file/process multiple files. You can choose to add your signature (or the caption) to the image and export the new files.
    If that solution is not flexible enough, consider using the very affordable (12$)  Elements+ add-on which offers a 'meta stamp' script :
    http://elementsplus.net/v5/en/meta-stamp.htm
    Otherwise, have a look at other free and good solutions like Faststone Photoresizer, Xnview...

  • Rotating a Brush in Photoshop

    I did a search and see people have been asking for some easy way to rotate a custom brush in Photoshop similar to using the brackets to resize the brush. I have a Wacom Intuos 4 tablet. I can change the brush angle by tilting the pen, but as far as I can tell, I don't get to see the brush orientation on the screen before clicking...making it basically useless for my purposes. The current method of going to the brush shape box and rotating the circle and arrow is very slow especially if I need to rotate it a little with each stroke or impression.
    Does anyone know of an add-on command or script that might help me out? Or, if I am missing a feature, please advise. I did a lot of google searches on this topic and didn't see a solution on other sites either. It looks like a feature in demand, but still missing in the current software.
    M. Jackson

    About the time I asked this question on this forum, I sent an email to Wacom about any possible feature the Intuos 4 might have to rotate a brush. I received this response about a week later:
    "What you are looking for is the 6D Art Pen. This pen has enhanced barrel rotation so as you rotate the pen it rotates the brush on the screen (worst with most non round brushes). "
    I am now curious if anyone here has one of these pens and if you are able to see the rotation of the brush image on the screen as you rotate the stylus as described above?
    Thanks again,
    M. Jackson

  • Script That Crops Then Saves and Repeats?

    Hello,
    I am currently new to the scripting on Photoshop. Recently I have started to perform some very repetitive actions and was looking for alternatives to get them done. I looked around the internet for a certain script, but cannot find it. The scripts function would be the following...
    Have a set pixel ratio (2048x2048)
    Start in one of the corners
    Crop the image (Mine is currently a little more than 20,000x20,000 pixels) down to the pixel ratio
    Save that portion of the cropped image in png
    Move left or right or down (whichever is logically next)
    Repeat the process until the whole file has been saved in smaller chunks
    If anyone knows if this script exists please point me to the correct resource, this would help me so, so, so much.
    For anyone who is curious, here is the reason why I need a script that does this.
    Currently I am working on the starting stages of a very large platformer game. Currently art seems to be the most heavy task on the game. The platforming world is going to be very large and hopeful everything will be unique (as in no repeating patterns or textures). There will be two artist working on the game, myself included. I was trying to find a more efficient way of saving these very large scale files in chunks. My current file or test file is around 20,000x20,000 pixels. Doing the math to save one layer of this image in 2048 block images will take 100 repetitive save motions. Take this number times 3 for the amount of layers I need saved and it jumps up to 300. In the end the game will be somewhere around 20,000x100,000 pixels, which will just kill me if I have to do it by hand. It would take days.
    I have tried using slicing and the save for web option, but Photoshop cannot handle the large file. If there are any other methods that I can use to save a Photoshop image in 2048x2048 chunks easily, please let me know. This is a sort of make it or break it deal for the games art on whether we can make it more unique or have to use a lot of repeating patterns.

    20.000 is not the product of a multiplication of 2048 and an integer.
    I can’t remember having come across any Script that fits your needs perfectly.
    If no one else can point to one and as the task is a somewhat specific one I wonder if you should try hiring someone to do it for you (if you should not be able to accomplish it yourself).
    ps-scripts.com • Index page
    Edit:
    Does this help? (You’d need to amend the line
    if (app.documents.length > 0) {main(300, 400)};
    naturally.)
    // make crops of an image according to a specific size;
    // 2014, use at your own risk;
    #target "photoshop-70.032"
    if (app.documents.length > 0) {main(300, 400)};
    ////// function //////
    function main (width, height) {
    // set to pixels and 72ppi;
    var myDocument = app.activeDocument;
    var docName = myDocument.name;
    var basename = docName.match(/(.*)\.[^\.]+$/)[1];
    var docPath = myDocument.path;
    // change to 72ppi;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var originalResolution = myDocument.resolution;
    myDocument.resizeImage (null, null, 72, ResampleMethod.NONE);
    var theState = myDocument.activeHistoryState;
    var theCounter = 0;
    var theVert0 = 0;
    for (var n = 0; n < Math.ceil (myDocument.height / height); n++) {
    theVert0 = height * n;
    var theVert1 = theVert0 + height;
    var theHor0 = 0;
    for (var m = 0; m < Math.ceil (myDocument.width / width); m++) {
    theHor0 = width * m;
    var theHor1 = theHor0 + width;
    // crop and save copy;
    cropThis(theVert0, theHor0, theVert1, theHor1);
    saveCopyAsTif (myDocument, docPath+"/"+docName+"_"+bufferNumberWithZeros (theCounter,3)+"_hor"+bufferNumberWithZeros (m, 3)+"_ver"+bufferNumberWithZeros (n, 3)+".tif");
    myDocument.activeHistoryState = theState;
    theCounter++;
    // reset;
    app.preferences.rulerUnits = originalRulerUnits;
    myDocument.resizeImage (null, null, originalResolution, ResampleMethod.NONE);
    ////// crop //////
    function cropThis (x1, x2, x3, x4) {
    // =======================================================
    var idCrop = charIDToTypeID( "Crop" );
        var desc7 = new ActionDescriptor();
        var idT = charIDToTypeID( "T   " );
            var desc8 = new ActionDescriptor();
            var idTop = charIDToTypeID( "Top " );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc8.putUnitDouble( idTop, idRlt, x1 );
            var idLeft = charIDToTypeID( "Left" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc8.putUnitDouble( idLeft, idRlt, x2 );
            var idBtom = charIDToTypeID( "Btom" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc8.putUnitDouble( idBtom, idRlt, x3 );
            var idRght = charIDToTypeID( "Rght" );
            var idRlt = charIDToTypeID( "#Rlt" );
            desc8.putUnitDouble( idRght, idRlt, x4 );
        var idRctn = charIDToTypeID( "Rctn" );
        desc7.putObject( idT, idRctn, desc8 );
        var idAngl = charIDToTypeID( "Angl" );
        var idAng = charIDToTypeID( "#Ang" );
        desc7.putUnitDouble( idAngl, idAng, 0.000000 );
        var idDlt = charIDToTypeID( "Dlt " );
        desc7.putBoolean( idDlt, false );
        var idcropAspectRatioModeKey = stringIDToTypeID( "cropAspectRatioModeKey" );
        var idcropAspectRatioModeClass = stringIDToTypeID( "cropAspectRatioModeClass" );
        var idtargetSize = stringIDToTypeID( "targetSize" );
        desc7.putEnumerated( idcropAspectRatioModeKey, idcropAspectRatioModeClass, idtargetSize );
    executeAction( idCrop, desc7, DialogModes.NO );
    ////// save pdf //////
    function saveCopyAsTif (myDocument, thePath) {
    // tif options;
    tifOpts = new TiffSaveOptions();
    tifOpts.embedColorProfile = true;
    tifOpts.imageCompression = TIFFEncoding.TIFFLZW;
    tifOpts.alphaChannels = false;
    tifOpts.byteOrder = ByteOrder.MACOS;
    tifOpts.layers = false;
    // save copy;
    myDocument.saveAs((new File(thePath)), tifOpts, true);
    ////// buffer number with zeros //////
    function bufferNumberWithZeros (number, places) {
      var theNumberString = String(number);
      for (var o = 0; o < (places - String(number).length); o++) {
      theNumberString = String("0" + theNumberString)
      return theNumberString

  • Animated PNG in Photoshop?

    I know how to creat animated GIF files in PS without issue. Is there anyway to create an Animated PNG in Photoshop? (including using 3rd party plugins)

    Has support for video formats progressed to the point where you can have a small, high-quality animated element right inline on a page without a play button?  And is there (partial) transparency in any video format?
    One does see such things in Flash, and I've certainly still got to go educate myself better on what can be done with HTML5.
    As far as having animated PNGs, it's not hard to think of applications where elements appear to hover over other elements on the page, perhaps drop shadows on the background, and move smoothly.  As a primitive example, bring up this page with a PNG, resize it, and (assuming the movement animates quickly for you, as it does in IE9) note how it catches your interest because it's doing something uncommon...  We've had GPUs that can easily facilitate real-time multilayer combinational rendering for a while now.  Granted, it might not be good to have EVERYTHING moving around and jockeying for position in the Z-order all at once.  That could end up as a good ol' fashioned mess.  But imagine the above ball rolling onto the page, and the pieces animating to show the prospective buyer how the puzzle works.
    With any data on the net, it's always a given that "less is better", but data size is not the only concern.  The job is being done in the first place to create value -- if no one thought that actually putting rich, eye-catching elements on web pages was valuable then all we'd have is black text on gray backgrounds.
    -Noel

  • A script that captures the coordinates of the mouse clicks and saves them into a file

    Hello,
    I'm trying to create a cartoon taking a movie (I've chosen blade runner) as base. I've got the real movie and I've exported all the pictures using VirtualDUB. Now I have a lot of images to modify. I would like to modify the actors faces with the faces generated by Facegen modeller. I'm thinking how to make the whole process automatic because I have a lot of images to manage. I've chosen to use Automate BPA,because it seems the best for this matter. I'm a newbie,so this is my first attempt using Adobe Photoshop and Automate BPA. I wrote a little script. It takes a face generated with Facegen modeller and tries to put it above the original actors faces. But it doesn't work very good and I'm not really satisfied,because the process is not fully automated. To save some time I need to write a script that captures the coordinates of the mouse when I click over the faces and that saves them into a file,so that Automate BPA can read these coordinates from that file and can put the face generated with Facegen Modeller above the original face. I think that Automate BPA is not good for this matter. I think that two coordinates are enough,X and Y. They can be the coordinates of the nose,because it is always in the middle of every face. It is relevant to knows how big should be the layer of the new face,too. This is the Automate BPA code that I wrote :
    <AMVARIABLE NAME="nome_foto" TYPE="TEXT"></AMVARIABLE>
    <AMVARIABLE NAME="estensione_foto" TYPE="TEXT"></AMVARIABLE>
    <AMSET VARIABLENAME="nome_foto">br</AMSET>
    <AMSET VARIABLENAME="estensione_foto">.jpeg</AMSET>
    <AMVARIABLE NAME="numero_foto" TYPE="NUMBER"></AMVARIABLE>
    <AMVARIABLE NAME="coord_x" TYPE="NUMBER"></AMVARIABLE>
    <AMVARIABLE NAME="coord_y" TYPE="NUMBER"></AMVARIABLE>
    <AMWINDOWMINIMIZE WINDOWTITLE="Aggiungere_layer - AutoMate BPA Agent
    Task Builder" />
    <AMWINDOWMINIMIZE WINDOWTITLE="AutoMate BPA Server Management Console
    - localhost (Administrator)" AM_ONERROR="CONTINUE" />
    <AMENDPROCESS PROCESS="E:\Programmi_\Adobe Photoshop
    CS5\Photoshop.exe" AM_ONERROR="CONTINUE" />
    <AMRUN FILE="%&quot;E:\Programmi_\Adobe Photoshop CS5\Photoshop.exe&quot;%" />
    <AMPAUSE ACTION="waitfor" SCALAR="15" />
    <AMSENDKEY>{CTRL}o</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="1" />
    <AMINPUTBOX RESULTVARIABLE="numero_foto">Inserire numero FOTO di
    partenza -1</AMINPUTBOX>
    <AMINCREMENTVARIABLE RESULTVARIABLE="numero_foto" />
    <AMPAUSE ACTION="waitfor" SCALAR="1" />
    <AMMOUSEMOVEOBJECT WINDOWTITLE="Apri" OBJECTNAME="%nome_foto &amp;
    numero_foto &amp; estensione_foto%" OBJECTCLASS="SysListView32"
    OBJECTTYPE="ListItem" CHECKOBJECTNAME="YES" CHECKOBJECTCLASS="YES"
    CHECKOBJECTTYPE="YES" />
    <AMMOUSECLICK CLICK="double" />
    <AMPAUSE ACTION="waitfor" SCALAR="10" />
    <AMSENDKEY>{CTRL}+</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="20" />
    <AMSENDKEY>l</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="429" MOVEY="281" RELATIVETO="screen" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="659" MOVEY="281" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="659" MOVEY="546" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="429" MOVEY="546" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="429" MOVEY="281" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMSENDKEY>v</AMSENDKEY>
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK CLICK="hold_down" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="131" MOVEY="99" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSEMOVE MOVEX="99" MOVEY="162" RELATIVETO="screen" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMMOUSECLICK CLICK="release" />
    <AMPAUSE ACTION="waitfor" SCALAR="2" />
    <AMINPUTBOX RESULTVARIABLE="coord_x">Inserire coordinata X</AMINPUTBOX>
    <AMINPUTBOX RESULTVARIABLE="coord_y">Inserire coordinata Y</AMINPUTBOX>
    <AMMOUSEMOVE MOVEX="200" MOVEY="200" RELATIVETO="screen" />
    <AMMOUSECLICK CLICK="hold_down" />
    <AMMOUSEMOVE MOVEX="%coord_x%" MOVEY="%coord_y%" RELATIVETO="position" />
    <AMMOUSECLICK />
    and this is a short video to explain better what I want to do :
    http://www.flickr.com/photos/26687972@N03/5331705934/
    In the last scene of the video you will see the script asking to input the X and the Y coordinates of the nose. This request is time consuming. For this reason I want to write a script that captures automatically the coordinates of the mouse clicks. The only thing to do should be click over the nose and the script should make the rest. As "c.pfaffenbichler" suggested here : http://forums.adobe.com/thread/775219, I could explore 3 ways :
    1) use the Color Sampler Tool’s input with a conventional Photoshop Script.
    2) use After Effects would provide a better solution.
    3) Photoshop’s Animation Panel might also offer some easier way as it might be possible to load two movies (or one movie and one image) and animate the one with the rendered head in relation to the other.
    Since I'm a totally newbie in graphic and animation,could you help me to explore these ways ? Thanks for your cooperation.

    These are the coordinates of the contours of the face that you see on the picture. Can you explain to me how they are calculated ? The coordinates of the first colums are intuitive,but I'm not able to understand how are calculated the coordinates of the second one.
    Thanks.
    1 COL     2 COL (how are calculated these values ?)
    307.5000 182.0000 m
    312.5000 192.0000 l
    321.5000 194.0000 l
    330.5000 193.0000 l
    335.0000 187.0000 l
    337.0000 180.5000 l
    340.0000 174.0000 l
    338.5000 165.5000 l
    336.0000 159.0000 l
    331.5000 153.0000 l
    324.5000 150.0000 l
    317.0000 154.0000 l
    312.5000 161.0000 l
    309.0000 173.0000 l
    307.5000 182.0000 l
    Message was edited by: LaoMar

  • When I try to print an jpeg or png from Photoshop all it does is convert the image to a PDF & plop it on my desktop- it won't print the image. Any suggestions as to how to fix this?

    When I try to print an jpeg or png from Photoshop all it does is convert the image to a PDF & plop it on my desktop- it won't print the image. Any suggestions as to how to fix this?

    Yes, the printer is on, it’s selected in Printer Set-Up & I’ve never had this problem before. It’s definitely a Photoshop issue as every other type of file prints fine. I’ve uninstalled Pshop & am now reinstalling. Hope that will do the trick.

  • How do I rotate a picture in Photoshop cs5

    How can i rotate a picture with photoshop cs5

    Ctrl-t on windows and command-t on a mac. That with let you rotate, scale and skew a picture on a layer.
    Image>Image rotation>{Choose one} That will rotate the entire document by what you choose.

  • Script that create Layerset with name from layer?

    Hello!
    This should be easy for someone who know whet is doing so not me:P
    I want script to automatically create layerset from each selected layer, name it as that layer and place that layer in it
    I found old script that do that but only normal layer not linked or embeded, and I want to do it for all selected layers not only to one
    Can someone modify it a little to work little better? I have no idea how to do it and probably would take me like thousands hours or more
    thx
    #target photoshop
    main();
    function main(){
    if(!documents.length) return;
    var doc = activeDocument;
    if(doc.activeLayer.kind != LayerKind.NORMAL) return;
    var layerRef = doc.activeLayer;
    var layerSetRef = doc.layerSets.add();
    layerSetRef.name = layerRef.name;
    layerRef.move(layerSetRef, ElementPlacement.PLACEATEND);

    You could remove the line
    if(doc.activeLayer.kind != LayerKind.NORMAL) return;
    But it would only work with one selected Layer (and also on selected LayerSets).
    To handle more than one selected Layer (or all Layers) some changes would be necessary.

  • Looking for a script that get images' urls from a website

    Hi,
    I have a website where users can insert theirs hotel informations.
    Most of them do not insert photos, I guess because the procedure is quite long and difficoult for the average user's skills.
    I'm looking for a script that take as input the url of the website and give as output the urls of the images of the site, so the user can decide which to upload on his tab.
    Someone can help me?

    La_Salamandra wrote:
    I have a website where users can insert theirs hotel informations.
    Most of them do not insert photos, I guess because the procedure is quite long and difficoult for the average user's skills.
    I'm looking for a script that take as input the url of the website and give as output the urls of the images of the site, so the user can decide which to upload on his tab.
    Someone can help me?
    You have to improve your design. Even if you can find the Coldfusion code, your design will still fall short in 2 ways.
    First, it is unreliable, because you're depending on some arbitrary site to be available and up to speed. Secondly, it is aesthetically wrong to be collecting pictures, especially large numbers of them, dynamically from someone else's site.  Think of their copyright and bandwidth.
    Fortunately, there are simple solutions. First, identify, by eye, the web pages containing the pictures you're interested in. Ask for permission from the owner.
    You could indeed use Coldfusion's cfhttp or any other script to download the JPGs, PNGs, and so on. But then, why waste your time re-inventing the wheel? It is infinitely better to use a web crawler !
    With most crawlers, you only have to supply the URL of the site, and the file extensions it has to grab (in your case, jpg, png, bmp, and so on).
    One click on the button, and you have them reeling in. Automatically. Some crawlers are considerate enough to enable you to adjust the download bandwidth. (We can learn from a million years evolution wisdom. The vampire bat is known to inject a painkiller before sucking!).
    Now that you've downloaded the images to your site, the links you display to your users are all yours. You may choose to resize some of the images, display them as you wish, and the issues of reliability and bandwidth are now up to you.

  • Script to rotate an image in InDesign CS4 from an Excel Spreadsheet

    Hi all,
    Is there a script for InDesign CS4 that reads degrees from an excel spreadsheet and then rotates a specific image by the same amount of degrees that was written in this excel spreadsheet? I would like to create a column in Excel full of rotation degrees and then go to InDesign, run the script for a specific image and the image will rotate automatically.
    If there isn't a script like that already around, can you let me know if it is possible to be done and also if it is possible, can you help me create one please?
    Thank you in advance for your help.
    Lucas

    a script to rotate images... only one at a time and marijan tompa had the answer for that: http://forums.adobe.com/message/2998073
    as for referencing an excel file or txt/csv, i don't know, but perhaps other posters could assist.
    colly

  • PS script that emails after completion?

    Hello, I have this script it's suppose to mail the PS document:
    Header 1
    var mailServer = "mail_Server_name";
    var mailAddress = "E-Mail-Address";
    var mailTitle = "Results of script";
    var mailText = "Script completed at " + new Date();
    printText = false; //True print results to Console.
    sendmail(mailServer, mailAddress,mailTitle,mailText);
    function sendmail(mailServer, mailAddress,mailTitle,mailText){
        var sObj = new Socket();
        if (sObj.open(mailServer+":25")) {
            sObj.writeln("HELO "+mailServer);
            var txt = sObj.read()+"\n";
            sObj.writeln("MAIL From: " + mailAddress);
            txt += sObj.read()+"\n";
            sObj.writeln("RCPT To: "+mailAddress);
            txt += sObj.read()+"\n";
            sObj.writeln("DATA");
            sObj.writeln("From: Photoshop");
            txt += sObj.read()+"\n";
            sObj.writeln("To: "+mailAddress);
            txt += sObj.read()+"\n";
            sObj.writeln("Subject: "+mailTitle);
            txt += sObj.read()+"\n";
            sObj.writeln(mailText);
            txt += sObj.read()+"\n";
            sObj.writeln(".");
            txt += sObj.read()+"\n";
            sObj.writeln("QUIT");
            txt += sObj.read()+"\n";
    if(printText) $.writeln(txt);
            sObj.close();
    I have it at the end of a previously working script. It does not give me any errors or anything but it also doesn't do anything. I filled in the variables for my email/results etc...and I tried ismtp.gmail.com for the mail_server_name. I think that is my problem, I'm not entirely sure what mail_server_name should look like.
    Any help would be appreciated. If you have another script that does the same thing I'd love to see it.
    -Sam

    Bump - any help at all? I'm trying to automatically email this to tumblr...maybe that helps?

  • How to Step through Scripts that are sent to other Adobe Apps?

    A newbie question. In the ExtendScript Toolkit, I'm examining a script that uses BridgeTalk to send a script to Photoshop. I understand how to step through and examine the variables and functions that execute within the Bridge application. But how can I step through and examine the variables that are sent to the Photoshop application? The script executes without breaking as soon as the BridgeTalk script is sent.
    Thanks
    Help Getting Started with Bridge Scripting 

    I not sure that you can… What you may be able to do in some cases… is comment out the sending of the bridgetalk message and write the script constructed string message body to the toolkit console… That you might be able to cut and paste to a new script window and run with #target photoshop your other option would be to add lines $.writeln( variable ); at the relevant places in the message body construction…

  • HELP:script that iterates through all opened documents and rezise them to match the biggest one.

    Hi,
    I'm making a batch processing action and I really need a script that iterates through all open documents, finds the one with the biggest image size and then iterates one more time to change the rest of the documents to the same image size dimensions. At the end all documents must share identical image size.  I'll really  appreciate if someone can put a quick script for doing this. Thank you !

    I think should do…
    #target photoshop
    if (documents.length > 1) {
         var smallest = 1000000; // Set beyond any size you may be expecting this should do?
         for (var a = 0; a < documents.length; a++) {
              smallest = Math.min(smallest,documents[a].width.as('px'));
         for (var b = 0; b < documents.length; b++) {
              if (documents[b].width.as('px') != smallest) {
                   app.activeDocument = documents[b];
                   var newWidth = new UnitValue(smallest, 'px');
                   documents[b].resizeImage(newWidth,undefined,undefined,ResampleMethod.BICUBICSMOOTHER);
    }else{
         alert("NOT enough docs to resize?");

Maybe you are looking for

  • Problems with Solaris 10 + mod_wl_20

    Hello all, I've been trying to get apache 2.0.58 that's shipped with Solaris 10 (Sparc) with mod_wl_20 from Weblogic 8.1 SP6 with not much luck. Every time I try connect to a mapped application via Apache+weblogic_mod I keep getting 404, it seems lik

  • Error(1,1): Line 1, Column 1 : XML-20108: (Fatal Error) Start of root elem

    Hi Plz tell me the solution of the following error . D:\JDeveloperOAF\jdevhome\jdev\myhtml\OA_HTML\WEB-INF\web.xml Error(1,1): <Line 1, Column 1>: XML-20108: (Fatal Error) Start of root element expected. D:\JDeveloperOAF\jdevhome\jdev\myhtml\OA_HTML\

  • HT2105 I have money in my account and can't find out how much is in ther.

    I have money in my iTunes account and can't get it. <Edited By Host>

  • Canon, Sony??

    From this helpful board, decided to buy a new camcorder after Dec 25. I am moving from 8mm to miniDV. Although, I was hoping by now that HD would do the job. My little pea brain says it should, but the collective wisdom of the Apple boards (and David

  • Removing app no longer available from GameCenter.

    I have an app on my GameCenter account. I deleted the app, and it is no longer available on the App Store. Is there anyway to remove it from my GameCenter account?