Announcement

Collapse
No announcement yet.

is there a way to record a script or convert ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Photoshop: is there a way to record a script or convert ?

    Hi

    i understand nothing about script

    but is there a way to record a script?
    i mean like an action


    for example click and select a tool , the hand tool , and let photoshop write the script (that have the command to select the hand tool)

    or is there a tool to convert an action to a script?

    thanks
    cheers

  • #2
    Re: is there a way to record a script or convert ?

    Hi mantra,

    yes, there is a way, but it creates really huge scripts and of course you can't record some of the interesting things like loops etc.
    What you need to do is go to your "Adobe\Adobe Photoshop CSX\Scripting\Utilities" folder and copy the file "ScriptListener.8li" to "Adobe\Adobe Photoshop CSX\Plug-ins\Automate".
    Now restart Photoshop and it'll automatically record everything you do and place the script on your desktop. When you don't need the functionality anymore, just put a "~" in front of the "ScriptListener.8li" inside your "Automate" folder.
    And you probably need to clean your script of junk, e.g. opening and closing particular files, if you want it to run on multiple images.

    Comment


    • #3
      Re: is there a way to record a script or convert ?

      Thanks/Danke Jonas, great tip...gonna give it a try

      Comment


      • #4
        Re: is there a way to record a script or convert ?

        Originally posted by Der_W View Post
        Hi mantra,

        yes, there is a way, but it creates really huge scripts and of course you can't record some of the interesting things like loops etc.
        What you need to do is go to your "Adobe\Adobe Photoshop CSX\Scripting\Utilities" folder and copy the file "ScriptListener.8li" to "Adobe\Adobe Photoshop CSX\Plug-ins\Automate".
        Now restart Photoshop and it'll automatically record everything you do and place the script on your desktop. When you don't need the functionality anymore, just put a "~" in front of the "ScriptListener.8li" inside your "Automate" folder.
        And you probably need to clean your script of junk, e.g. opening and closing particular files, if you want it to run on multiple images.
        Hi Jonas
        thanks
        i'm tring to have a short script to load cs5 always with the histogram in rgb mode and not in colors mode

        cheers

        Comment


        • #5
          Re: is there a way to record a script or convert ?

          Following John's advice in your other thread I just recorded a script that'll create a new 1x1px Lab file, which needs to stay open all the time. The next images you open should automatically have the histogram set to RGB.

          var idMk = charIDToTypeID( "Mk " );
          var desc1 = new ActionDescriptor();
          var idNw = charIDToTypeID( "Nw " );
          var desc2 = new ActionDescriptor();
          var idMd = charIDToTypeID( "Md " );
          var idLbCM = charIDToTypeID( "LbCM" );
          desc2.putClass( idMd, idLbCM );
          var idWdth = charIDToTypeID( "Wdth" );
          var idRlt = charIDToTypeID( "#Rlt" );
          desc2.putUnitDouble( idWdth, idRlt, 1.000000 );
          var idHght = charIDToTypeID( "Hght" );
          var idRlt = charIDToTypeID( "#Rlt" );
          desc2.putUnitDouble( idHght, idRlt, 1.000000 );
          var idRslt = charIDToTypeID( "Rslt" );
          var idRsl = charIDToTypeID( "#Rsl" );
          desc2.putUnitDouble( idRslt, idRsl, 72.000000 );
          var idpixelScaleFactor = stringIDToTypeID( "pixelScaleFactor" );
          desc2.putDouble( idpixelScaleFactor, 1.000000 );
          var idFl = charIDToTypeID( "Fl " );
          var idFl = charIDToTypeID( "Fl " );
          var idWht = charIDToTypeID( "Wht " );
          desc2.putEnumerated( idFl, idFl, idWht );
          var idDpth = charIDToTypeID( "Dpth" );
          desc2.putInteger( idDpth, 8 );
          var idprofile = stringIDToTypeID( "profile" );
          desc2.putString( idprofile, "none" );
          var idDcmn = charIDToTypeID( "Dcmn" );
          desc1.putObject( idNw, idDcmn, desc2 );
          executeAction( idMk, desc1, DialogModes.NO );

          Comment


          • #6
            Re: is there a way to record a script or convert ?

            Originally posted by Der_W View Post
            Following John's advice in your other thread I just recorded a script that'll create a new 1x1px Lab file, which needs to stay open all the time. The next images you open should automatically have the histogram set to RGB.
            thanks Jonas!!!!
            did you use ScriptListener.8li ?

            let me understand , you did start photoshop, the script start to record
            create a new 1x1px lab file and you did close photoshop

            and did you copy and paste the script?
            or had you to edit the script

            thanks
            cheers

            Comment


            • #7
              Re: is there a way to record a script or convert ?

              Yes, I used the ScriptListener for this as I saw no information on how to set the histogram in the JavaScript reference document.

              That's entirely true, I just recorded starting the script, creating the file and closing Photoshop.
              The only thing I had to edit was to remove the last part, were I had to close the file, because otherwise that would have been part of the script as well and be quite useless.

              Btw. I'm still asking myself, why not create an action to do these exact steps? I mean, basically what the ScriptListener does is create a temporary action and run it, so I don't see much benefit in using a script here

              Comment


              • #8
                Re: is there a way to record a script or convert ?

                Originally posted by Der_W View Post
                Yes, I used the ScriptListener for this as I saw no information on how to set the histogram in the JavaScript reference document.

                That's entirely true, I just recorded starting the script, creating the file and closing Photoshop.
                The only thing I had to edit was to remove the last part, were I had to close the file, because otherwise that would have been part of the script as well and be quite useless.

                Btw. I'm still asking myself, why not create an action to do these exact steps? I mean, basically what the ScriptListener does is create a temporary action and run it, so I don't see much benefit in using a script here
                yes i agree with the action
                but i though that a short script could set to rgb the histogram without this trick

                thanks
                cheers

                Comment

                Related Topics

                Collapse

                • jjwithers
                  Layer Comps to PNG without Numeric Prefix?
                  by jjwithers
                  I'm going to be saving thousands of layer comps out to PNGs from a series of PSD files and i recently noticed that the script adds a numbered prefix to the name of the files. I do not want this number. Is there any way to run the script without the prefix?
                  The file names will have to be specific...
                  10-04-2010, 10:56 PM
                • infinityspiral
                  Targeted layer visibility toggle script
                  by infinityspiral
                  First post here so sorry if this isn't in the right section. I wrote a few scripts for Photoshop that make my workflow a little easier. The script will take the currently selected layer/group and make it hidden. It also marks it with a "[T]" for toggle. Like this:

                  Code:
                  Layer0
                  ...
                  11-08-2013, 02:50 PM
                • Cameraken
                  Script to Detect Upright and View images
                  by Cameraken
                  Hi

                  Let's assume I have a CD full of pictures. All the pictures are different sizes some are upright and some are view, some may even be square. (But they are all correctly orientated)

                  What I would like to do is create a batch file to:

                  Find the longest side...
                  01-06-2008, 10:23 AM
                • acollazo
                  Script for Renaming Layers
                  by acollazo
                  Hello. I came to RetouchPro by following a link from Adobe Forums which said, "There is an excellent script available for Photoshop which allows you to not only replace words in layer names, but also insert words as Prefixes, Suffixes and Sequential Numbers." But I cannot find this "excellent...
                  Are there any scripts to find and replace layer names? There is an excellent script available for Photoshop which allows you to not only replace words
                  05-17-2018, 08:41 AM
                • scooter41
                  Delete files via Script in Photoshop?
                  by scooter41
                  Hi Guys,

                  Just wondering what the limits to photoshop scripting are? I have never really used them so not sure if its at all possible. But basically I have a script that resizes a bunch of images for the web and always saves them to a "web uploads" folder, I then upload them,...
                  02-13-2007, 02:19 AM
                Working...
                X