Highlighted

Save for Web & Devices and scripting

Participant ,
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.

Adobe Community Professional
Correct answer by CarlosCanto | Adobe Community Professional

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.

TOPICS
Scripting

Views

64

Likes

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

Save for Web & Devices and scripting

Participant ,
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.

Adobe Community Professional
Correct answer by CarlosCanto | Adobe Community Professional

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.

TOPICS
Scripting

Views

65

Likes

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
Oct 30, 2020 0
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Oct 30, 2020 1
Participant ,
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?

Likes

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
Reply
Loading...
Oct 30, 2020 0
Adobe Community Professional ,
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. 

Likes

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
Reply
Loading...
Oct 30, 2020 0
sPretzel LATEST
Participant ,
Oct 31, 2020

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Oct 31, 2020 0
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Oct 30, 2020 1
Participant ,
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.

Likes

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
Reply
Loading...
Oct 30, 2020 0
Resources