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

Save for Web javascript Output Settings

New Here ,
Sep 14, 2019 Sep 14, 2019

Photshop api does not appear to have reference to Save for Web "Output Settings".  Is this something that might be accessed using ActionDescriptor?  Particulary would like to make sure from Saving Files that all File Compatibilty options are set to false.

TOPICS
Actions and scripting
502
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
Community Expert ,
Sep 14, 2019 Sep 14, 2019

Can you post a screenshot showing the desired file format (perhaps circle or highlight or otherwise annotate the exact options).

 

Edit: Here is a screenshot from the JS Reference, which options outside of these are you looking at?

 

ref.pngexpand image

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
New Here ,
Sep 14, 2019 Sep 14, 2019

I certainly can. See below. Yes, we set certain properties from the js reference provided. The issue is when using save for web (legacy) is spaces in the files name are replaced with dashes. Not a big deal but not the desired result. To resolve User must adjust Output Settings:Saving Files:FIlename Compatibility.  So we are looking to progromatically apply these settings.

 

clipboard_image_0.pngexpand image

 

clipboard_image_1.pngexpand image

 

clipboard_image_2.pngexpand image

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
Community Expert ,
Sep 14, 2019 Sep 14, 2019

To change the hyphen to a word-space in the filename output, the AM code for ( "ovCU" ) ( idovCU, true );

 

 

 

 

 

var idovCU = charIDToTypeID( "ovCU" );
desc408.putBoolean( idovCU, true );

 

 

 

 

 

Should be changed from true to false:

 

 

 

 

 

var idovCU = charIDToTypeID( "ovCU" );
desc408.putBoolean( idovCU, false );

 

 

 

 

 

Here is a screenshot when I was comparing the difference in the recorded SL code, based on two different outputs with different SfW settings:

 

hyphen-to-space.pngexpand image

 

Of course, to make the recorded AM code usable, I had to run it through Clean SL, which totally changed the code structure, however the boolean is in the same relative position in the reworked code (3rd last boolean). 

 

You could likely change "ovCM"/idovCM and "ovCW"/idovCW to false as well.

 

I am guessing that:

ovCM = Mac

ovCW = Win

ovCU = unix

 

Hope this helps!

 

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
New Here ,
Sep 15, 2019 Sep 15, 2019
LATEST
This is awesome, thank you! I have yet to test but will today. I completly forgot about SL. It certainly does provide a starting point.
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