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

Save for Web & Devices and scripting

Engaged ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

Hi,

I see some options in the UI when selecting "Save for Web & Devices" that I don't find in the scripting functionalities.

For example, I can select Grayscale in PNG8 in the UI but the ColorReductionMethod options available in script (ExportOptionsPNG8 properties) are only: adaptive, perceptual, selective, web (those are also available in the UI).

I also come across Auto for Colors in the UI but I don't see such option for colorCount in scripting where the value must be a number between 2 and 256.

Can someone explain if I am missing something?

This is for CS4.

Thanks.

TOPICS
Scripting

Views

344

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

correct answers 1 Correct answer

Community Expert , Oct 30, 2020 Oct 30, 2020

no, you're not missing anything, not all Illustrator features are included in the Scripting API.

 

on top of that, ExportForScreens came out way after CS4.

Votes

Translate

Translate
Adobe
Community Expert ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

no, you're not missing anything, not all Illustrator features are included in the Scripting API.

 

on top of that, ExportForScreens came out way after CS4.

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
Engaged ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

Hi Carlos. I thought scripting can do everything I can do in the UI and then some. But it looks as though the UI can do some things scripting can't and scripting can do some things the UI can't.

I will look up ExportForScreens in a later version of AI documentation as I don't know what it is.

Based on what you are saying, I understand that Grayscale is only available if I save for web via the UI but it is not available in script.

As to Auto for Colors in the UI, do you know where I can find what value it actually selected automatically in the file that is saved?

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
Community Expert ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

oh ok, you're not using ExportForScreens then, you couldn't if you are using CS4. I wen't back but could not find Greyscale or Auto for Colors in the UI, but I'm in the newest version so, interface may have changed.

 

anyway, my previous comment still holds, not everything you can do in the UI is available to scripting. The PNG8 options are documented and all we have is what's listed. 

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
Engaged ,
Oct 31, 2020 Oct 31, 2020

Copy link to clipboard

Copied

LATEST

To answer my own question, I see that the number of colours is indicated in the status bar right below the image in the Save for Web & Devices window. This is also applicable when Colors is set to Auto.

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
Community Expert ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

I don't think I'm being facetious to say that you probably instinctively know the answer to most things like this by now.

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
Engaged ,
Oct 30, 2020 Oct 30, 2020

Copy link to clipboard

Copied

Hi Doug. With much "humbleness", after searching for a while, I kind of do but I am not always right so it is safer to ask.

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