COM Automation anyone?

G
Posted By
gnews
Jun 28, 2003
Views
688
Replies
0
Status
Closed
Is anyone using the new COM Automation API in Photoshop 7? The documentation in the downloadable SDK is lamentable and almost totally useless. What I know I could only guess from a handfull of old posts and by directly looking at the typelibs.

It seems like PS 4 and up supported a bare bone Automation whose only goal was to start PS, open a document and then call Actions on it. All real work was done from within those Actions.

PS 7 ships with a new Automation API that is differentiated from the old one by using "Photoshop.Application.7" instead of "Photoshop.Application" when creating the Application object. However, it seems as if the returned objects are still the older ones. Here’s a sample.

(Javascript)
var ps = new ActiveXObject("Photoshop.Application.7"); var doc = ps.open("d:\\somefile\\oldman.jpg"); WScript.Echo("output=" + doc.Title); // Works. Old Automation API WScript.Echo("output=" + doc.FullName);// Fails. New Automation API

Is anything wrong with this and has anobody got WSH scripts working with the new API?
Thanks.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections