So, where I work, we have a script that handles all of our heavy lifting. This script is running on CS6, and all of the users are running CC 2014. Now when the CS6 machine opens a document with any type of vector object from CC 2014 it throws a dialog box asking if I want to flatten, cancel, or Keep layers. I do have DISPLAYDIALOGS.NO set at the top of this script.
I under stand scripting quite well, but I'm just not sure if there are app.open options to tell this to keep layers. Also, I'm pretty sure a try catch block will not work, becuase this dialog appears before the image is actually pixels on the screen.
When the script generates our web images I've tried to flatten the document right after its opened and I still see this dialog. Any help would be super appreciated.
app.open will encounter problems that you really have no control over so you get an annoying dialog that you can't do anything with. The one that caused me the most grief is when a script tries to open a corrupt jpg image. IMNSHO, app.open should throw an Exception if it can't open the file and DisplayDialogs.NO is set. That way you can log the filename and deal with it later.
Bottom line is that there is nothing you can do in JS. One thing I have done in the past was use a utility like AutoKey on Windows that looks for these dialogs and automatically responds to them so you can continue processing. I'm fairly certain there is something similar available for OS X.
haha, go figure there isn't anything. oooh extendscript, the love hate relationship we have.
Thank you very much xbytor2. Thats a good enough for me for the gold star!