tell application "Adobe Illustrator"
activate
tell current document
set theCount to (count of layers) as text
set theProperties to {}
repeat with EachLayer from 1 to theCount
if EachLayer > 1 and EachLayer < theCount then
set theProperties to page items of layer EachLayer
repeat with EachItem from 1 to count of theProperties
set selection to item EachItem of page items of layer EachLayer
tell application "System Events" to tell process "Illustrator"
try
click menu item "Convert to Grayscale" of menu 1 of menu item "Edit Colors" of menu 1 of menu bar item "Edit" of menu bar 1
end try
end tell
end repeat
end if
end repeat
end tell
end tell