• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Save copy from automation plugin fails

Explorer ,
Jun 01, 2010 Jun 01, 2010

Copy link to clipboard

Copied

Hi!

I'm trying to save a copy of the current image from an automation plugin. The Listener plugin generates code for this nicely. There is one problem with - it doesn't work! I found the first bug quickly - there was a backslash in the path (and you would need to put \\ in C, otherwise it takes it as an escape character)! I corrected that, but it still fails. The Play call fails and returns with error code -43 (file not found).

Note that I'm on Windows XP and administrator on my machine, so it's also not a file access rights problem.

Then I thought, let's just create a file with that name there and see what happens. Well, the Play call deletes the file, then fails with same code!

I also tried specifying just the diretory, doesn't work either.

What works is changing the last parameter to pluginDialogDisplay. But I wouldn't like a dialog to pop up, so that's not an option. (neither one of pluginDialogSilent and pluginDialogDontDisplay works)

Does anyone have any suggestions?

Thanks in advance,

Kornel

TOPICS
SDK

Views

706

Translate

Translate

Report

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
Contributor ,
Jun 01, 2010 Jun 01, 2010

Copy link to clipboard

Copied

Well, the soothing news is that in general it _does_ work  , so there must be something wrong with your code. In  general, its easier to answer this sort of questions if you also  copy&paste the snippet of the the relevant code.

A couple of thoughts:

1) make sure you are using the most simple case to test you code (e.g. a hardcoded path to a .psd file in C:\temp, no spaces, no special characters, straight slashes, not on the network location, full-control permissions on the folder etc)

2) Depending on the destination format you may have to populate the descriptor with a few parameters, in addition to the destination, if you want the save to work without the dialog (that would otherwise do it for you). Listener should record them for you; make sure you are specifying there in the descriptor and remember that they are format-specific (ie. recording save parameters from format A and trying to use them to save a file into a format B may not work) .

Votes

Translate

Translate

Report

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 ,
Jun 01, 2010 Jun 01, 2010

Copy link to clipboard

Copied

Thanks! I was already starting to give up on this path, but now I played a little more with it and managed to solve it. The problem was that I changed the "\" to a "/", which normally also works, and it's what I usually use. Unfortunatelly it seems like Photoshop doesn't eat it.

To Abode: please fix the Listener sample not to generate a single \ in a C string! Might spare someone some headache.

Kornel

Votes

Translate

Translate

Report

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
Contributor ,
Jun 01, 2010 Jun 01, 2010

Copy link to clipboard

Copied

LATEST

Yeah, its the  straight slashes that I've mentioned above - apparently the Photoshop SDK expects the delimiters to be the same as these natively used on the platform (backslash on PC, regular slash on Mac)

Votes

Translate

Translate

Report

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