Skip to main content
May 15, 2009
Question

Photoshop Script Record

  • May 15, 2009
  • 2 replies
  • 4953 views

Is there a tool which can record the actions that are perfomred in Photoshop.

Had Script Editor and Script Debugger, but they are not able to record the actions that Photoshop application is performing. Is there anything that I need to enable in Photoshop so that the tools can record actions that photoshop is performing

Using Photoshop CS3(10.0.1)

System :MacBook(version 10.5.7)

This topic has been closed for replies.

2 replies

Participant
October 28, 2009

There is a much easier way to do this. It sounds like you are just trying to create scripts in Photoshop to perform repetitive tasks for you.

If you open the Actions window within Photoshop, you can use the default scripts by hitting the Play button. You can create you own scripts from here by Clicking the "Create a new action" button, it will automatically start recording. Hit the Stop button to stop recording. You can also use these actions with the Batch function. Go to File>Automate>Batch. Choose your Action and a folder to perform the action on. Choose any additional settings.

Hope this helps.

Muppet_Mark-QAl63s
Inspiring
October 28, 2009

No conditional logic though…

Muppet_Mark-QAl63s
Inspiring
May 15, 2009

Check out the 'Script Listener' Plug-In that comes with the app. How to use this is documented in the Scripting Guides.

May 15, 2009

I already installed Script Listener plugin and I am not able to understand the log. I do my scripting with Apple Script and Python. Why Apple Script Editor not able to record the actions that are performed by an application

Muppet_Mark-QAl63s
Inspiring
May 15, 2009

You need to get yourself over to http://www.ps-scripts.com/ find the latest version of 'xTools' install it. Part of this is a script clean up the code and make a function of it. This will help you make much more out of the plug-in's output. The code can then be called from inside your AppleScript tell doc block.

OK I had a quick try during lunch and made a sample script:

tell application "Adobe Photoshop CS2"

activate

set Doc_Ref to the current document

tell Doc_Ref

do javascript "LayerOuterBevel(255,255,255,50,0,0,0,75,120,30,80,12,3);

//

function LayerOuterBevel(hR,hG,hB,hOpacity,sR,sG,sB,sOpacity,angle,altitude,depth,size,soften) {

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

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

    var desc1 = new ActionDescriptor();

        var ref1 = new ActionReference();

        ref1.putProperty( cTID('Prpr'), cTID('Lefx') );

        ref1.putEnumerated( cTID('Lyr '), cTID('Ordn'), cTID('Trgt') );

    desc1.putReference( cTID('null'), ref1 );

        var desc2 = new ActionDescriptor();

        desc2.putUnitDouble( cTID('Scl '), cTID('#Prc'), 416.666667 );

            var desc3 = new ActionDescriptor();

            desc3.putBoolean( cTID('enab'), true );

            desc3.putEnumerated( cTID('hglM'), cTID('BlnM'), cTID('Scrn') );

                var desc4 = new ActionDescriptor();

                desc4.putDouble( cTID('Rd  '), hR );

                desc4.putDouble( cTID('Grn '), hG );

                desc4.putDouble( cTID('Bl  '), hB );

            desc3.putObject( cTID('hglC'), cTID('RGBC'), desc4 );

            desc3.putUnitDouble( cTID('hglO'), cTID('#Prc'), hOpacity );

            desc3.putEnumerated( cTID('sdwM'), cTID('BlnM'), cTID('Mltp') );

                var desc5 = new ActionDescriptor();

                desc5.putDouble( cTID('Rd  '), sR );

                desc5.putDouble( cTID('Grn '), sG );

                desc5.putDouble( cTID('Bl  '), sB );

            desc3.putObject( cTID('sdwC'), cTID('RGBC'), desc5 );

            desc3.putUnitDouble( cTID('sdwO'), cTID('#Prc'), sOpacity );

            desc3.putEnumerated( cTID('bvlT'), cTID('bvlT'), cTID('SfBL') );

            desc3.putEnumerated( cTID('bvlS'), cTID('BESl'), cTID('OtrB') );

            desc3.putBoolean( cTID('uglg'), true );

            desc3.putUnitDouble( cTID('lagl'), cTID('#Ang'), angle );

            desc3.putUnitDouble( cTID('Lald'), cTID('#Ang'), altitude );

            desc3.putUnitDouble( cTID('srgR'), cTID('#Prc'), depth );

            desc3.putUnitDouble( cTID('blur'), cTID('#Pxl'), size );

            desc3.putEnumerated( cTID('bvlD'), cTID('BESs'), cTID('In  ') );

                var desc6 = new ActionDescriptor();

                desc6.putString( cTID('Nm  '), 'Linear' );

            desc3.putObject( cTID('TrnS'), cTID('ShpC'), desc6 );

            desc3.putBoolean( sTID('antialiasGloss'), true );

            desc3.putUnitDouble( cTID('Sftn'), cTID('#Pxl'), soften );

            desc3.putBoolean( sTID('useShape'), false );

            desc3.putBoolean( sTID('useTexture'), false );

        desc2.putObject( cTID('ebbl'), cTID('ebbl'), desc3 );

    desc1.putObject( cTID('T   '), cTID('Lefx'), desc2 );

    executeAction( cTID('setd'), desc1, DialogModes.NO );

};" show debugger on runtime error

end tell

end tell