GPU/CPU Preview

Explorer ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

Is there any way to validate if document is in GPU/CPU preview  through jsx ?

TOPICS
Scripting

Views

124

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
community guidelines
LEGEND ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

I'm guessing not, but I'm not sure.
If you're using Keyboard Maestro (Mac only) or similar macro builder it can be done by testing the active menu item. A value could then be sent back to Illustrator in JSX:

rcraighead_0-1658581742108.png

 



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
community guidelines
Adobe Employee ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

Hi @Daksri,

 

Thanks for reaching out. You may not be looking for this and probably know this, but I am putting it up here just in case. To quickly check if you are document is under GPU or CPU preview, you may check the document tab.

 

For GPU preview, only "color profile/ Preview" will be mentioned in the document tab.

Anshul_Saini_0-1658523497908.png

 

For CPU preview, "color profile/CPU preview" will be mentioned in the document tab.

Anshul_Saini_1-1658523523836.png

 

I hope this helps!

 

Regards,

Anshul Saini

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
community guidelines
Explorer ,
Jul 23, 2022 Jul 23, 2022

Copy link to clipboard

Copied

Thank you for the reply. But i want it through jsx code . 

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
community guidelines
Adobe Employee ,
Jul 25, 2022 Jul 25, 2022

Copy link to clipboard

Copied

LATEST

That's what I thought so. I am not a scripting expert. I am leaving this discussion open for expert suggestions.

I hope you get help from someone.

 

Regards,
Anshul Saini

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
community guidelines
Community Expert ,
Jul 22, 2022 Jul 22, 2022

Copy link to clipboard

Copied

I couldn't find any way. One approach—would have to be via a third-party utility—would be to get the window title, which will include the text "CPU" (at least on English version of Illustrator).

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
community guidelines
Participant ,
Jul 23, 2022 Jul 23, 2022

Copy link to clipboard

Copied

Another approach would be to make a custom plugin which will check  a state for "IsGPUpreviewModeOn" for a current document view and connect it to a scripting model using SendScriptMessage. 

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
community guidelines
Explorer ,
Jul 23, 2022 Jul 23, 2022

Copy link to clipboard

Copied

Thank you for the reply  , but how to create custom plugin and following other changes. I am new to jsx .

 

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
community guidelines