If you don't want a console, just don't create one in the first place. The SetOption("WrapAtEOL", "On") function will create the console since it is a console directive.
That flash of the black DOS box is so unprofessional looking. Yes, you could force a suppression with the -i switch but IMHO that is taking the lazy way out. Better to just not create the console in the first place.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.