Answered
The object "Clear Guides" is not currently available.
I made an action to clear guides and call it from a script but in case there are no guides this error apears.
Is it possible to not show this error if there are no guides in the current document? 
I did not find function doScript in Illustrator scripting guide.
