Convert action to 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

myranalis

Convert action to script?

Post by myranalis »

Didn't I see a reference somewhere to something that would convert an action to a script?? I can't find it... If it exists, will someone pls point me in the right direction? Cheers
xbytor

Convert action to script?

Post by xbytor »

myranalis

Convert action to script?

Post by myranalis »

awesome. thx
myranalis

Convert action to script?

Post by myranalis »

I've just run a really quick test on this - the javascript output great, but when I run the resulting script I'm having an issue with the step that used to do a warp - the action allows the user to adjust the warping grid before it continues...

The resulting javascript for the step is:

function step8(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(cTID('Mn '), cTID('MnIt'), cTID('warp'));
desc1.putReference(cTID('null'), ref1);
executeAction(cTID('slct'), desc1, dialogMode);
};

The error I'm gettings is: "<unknown> menu item is not currently available"

Any ideas why?
myranalis

Convert action to script?

Post by myranalis »

anyone?? pls??
xbytor

Convert action to script?

Post by xbytor »

PS is in a state when that step executes that doing a Warp is not possible. It's hard to tell why without more info.
jigsaw

Convert action to script?

Post by jigsaw »

hi, can anyone pls tell me how to execute this script
Mike Hale

Convert action to script?

Post by Mike Hale »

Sorry but it's not clear to me what script you want help with.

The code posted by myranalis is a function that doesn't work by itself. It needs other code to make sure something it active, visible, etc. or the function fails.
jigsaw

Convert action to script?

Post by jigsaw »

Regarding action converter. I found the code in sourceforce.net, but i dont know how to proceed with it further to make it.