calling Smart Sharpen and Auto Levels from script?

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

tenchy

calling Smart Sharpen and Auto Levels from script?

Post by tenchy »

I've found how to call the Unsharp Mask from within a script:

activeDocument.activeLayer.applyUnSharpMask(120,0.4,5);

I'm wondering if the same applies to Auto Levels and Smart Sharpen, and if so, does anyone have the correct syntax please?
tenchy

calling Smart Sharpen and Auto Levels from script?

Post by tenchy »

Believe I found the Auto Levels:

activeDocument.activeLayer.autoLevels();

Yes?
Paul MR

calling Smart Sharpen and Auto Levels from script?

Post by Paul MR »

Have a look at SmartSharpen.jsx in X's xtools.
Auto Levels looks ok.
tenchy

calling Smart Sharpen and Auto Levels from script?

Post by tenchy »

Thanks Paul. Crikey that's a beastie!
xbytor

calling Smart Sharpen and Auto Levels from script?

Post by xbytor »

Smart Sharpen has lots of switches and dials. The code in the script is based on Script Listener output (or generated from an action) so it contains all of the controls. If you are looking for only a subset of the functionality, you could get away with a simpler solution.

-X
Mike Hale

calling Smart Sharpen and Auto Levels from script?

Post by Mike Hale »

If you do not want to be able to control the smart sharpen options with the script one simple way would be to call an action that has your smart sharpen step.
tenchy

calling Smart Sharpen and Auto Levels from script?

Post by tenchy »

Thanks for that guys. I'll most prob be back to this thread if I can't do suss out how to trim down the script.
(I have never recorded an action yet. I'm still a noob when it comes to PS scripting and actions)