Is there any way to validate if document is in GPU/CPU preview through jsx ?
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:
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.
For CPU preview, "color profile/CPU preview" will be mentioned in the document tab.
I hope this helps!
Thank you for the reply. But i want it through jsx code .
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.
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).
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.
Thank you for the reply , but how to create custom plugin and following other changes. I am new to jsx .