There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
It is not possible to script out objects that are encrypted, these include UDF'd, Sp's and Triggers.
After a new database is selected and the objects are loaded a check for encrypted objects should be performed.
If any encrypted objects are found a warning message should be displayed and the objects should not be selectable for scripting, maybe the background color of their row should be different..
SMO provides the propery IsEncrypted at the Object level. I do not believe the Db.EnumObjects can provide this but I may be wrong.