Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

result descriptors from automation scripts...

Explorer ,
Aug 26, 2008 Aug 26, 2008
Let's use Fit Image.jsx as an example.

I can call it with a chunk of code that looks like this:

Stdlib.PSfitImage = function(width, height) {
var desc = new ActionDescriptor();
desc.putUnitDouble( cTID('Wdth'), cTID('#Pxl'), width );
desc.putUnitDouble( cTID('Hght'), cTID('#Pxl'), height );

var fitId = sTID('3caa3434-cb67-11d1-bc43-0060b0a13dc4');
return executeAction(fitId , desc, DialogModes.NO );
};


My problem is that the descriptor that is returned has 0 elements in it. I
really need that result descriptor. Is there something I can change in Fit Image
to make it seamlessly return the descriptor, or do I have to stream it to and
from a file on disk?


-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
TOPICS
Actions and scripting
397
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guru ,
Aug 28, 2008 Aug 28, 2008
Hi X,

Maybe I'm missing something or it's a CS3 issue, but in CS2 I get a two count descriptor. But it just echos the arguments used in Stdlib.PSfitImage
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 28, 2008 Aug 28, 2008
LATEST
> Maybe I'm missing something or it's a CS3 issue, but in CS2 I get a two count descriptor. But it just echos the arguments used in Stdlib.PSfitImage

Fit Image is a plugin in CS2. In CS3 it is an Automation Framework Script, a
much different beasty. My guess is that they didn't quite make the script
versions exactly the same in this respect. The fix looks pretty easy. Just
return app.playbackParameters as the result of the call and you're set. Instead,
I'm dumping the descriptor to a file and reading it back after the call. Klutzy
but functional. And, in my case, too slow. For per image things, it suX0Rz but
for exports (like Contact Sheet X) it may actually be worthwhile.

I also like having the scripts, BTW. New tricks to learn and the ability to fix
bugs are nice things to have.

-X
--
for photoshop scripting solutions of all sorts
contact: xbytor@gmail.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines