Hello Carlos,thanks again but I have this error : "Invalid enumeration
value" and I saw that imageColorSpace is read-only too.
Now this alert(app.activeDocument.rasterItems.imageColorSpace) return
ImageColorSpace.CMYK
2014-02-04 CarlosCanto <forums_noreply@adobe.com>:
Re: Convert to Grayscale created by CarlosCanto<http://forums.adobe.com/people/CarlosCanto>in *Illustrator
Scripting* - View the full discussion<http://forums.adobe.com/message/6085018#6085018
oops, sorry about that, I should have checked before giving you bad advice.
you may have to record an action (manually) to convert to grayscale then run the action via javascript
or
use executeMenuCommand, and try to find the right "string" to call convert to grayscale
both methods are new to CS6, but undocumented. Search the forum, usage samples have been posted before...sorry I'm still with CS5 I can't test.
check here
http://forums.adobe.com/message/4568818#4568818