it seems there's no grayscale in the jpg options, as a workaround you could record an action to Select All and Edit->Edit Colors->Convert to Grayscale.
then you'll be able to run this action with your script.
Dear CarlosCanto i have also tried this life
but not get fruitful result how can loaded action can run programatically would you please point to that line which line of would be add in above my code .
when i am adding load action always showing action is running false . thanx
var userDesktop = Folder.desktop; var f = new File(userDesktop+'/yourActionFile.aia'); app.loadAction (f); app.doScript ('actionName', 'setName');