Skip to main content
Participant
May 17, 2010
Question

Can you automate an action(file info)

  • May 17, 2010
  • 1 reply
  • 968 views

Can you automate and action?  What we want is for the file info to be read and if there is info, for it to automatically open?  Is this possible?

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
May 19, 2010

I don’t think opening the File Info Window can be JavaScripted (as it seems to record no ScriptingListener-code).

What Info fields specifically do you mean?

It should be possible to Script an alert of the content of any of the Scriptable fields and link it with Script Events Manager to Open Document.

(See »DocumentInfo«, p.100 in »Photoshop CS4 JavaScript Ref.pdf«)

Paul Riggott
Inspiring
May 19, 2010

You can open the file info with this code Christoph...

fileInfo();
function fileInfo() {
    var desc3 = new ActionDescriptor();
        var ref2 = new ActionReference();
        ref2.putEnumerated( charIDToTypeID('Mn  '), charIDToTypeID('MnIt'), charIDToTypeID('FlIn') );
    desc3.putReference( charIDToTypeID('null'), ref2 );
    executeAction( charIDToTypeID('slct'), desc3, DialogModes.NO );
}

c.pfaffenbichler
Community Expert
Community Expert
May 19, 2010

Thanks; I stand corrected.

Now the OP just has to set up a conditional for any documentInfo-

content.