also, I must ask the code also as there is no loop code given.

oh, and remove all these:
If SetConsole ("SHOW") = 0 Endif

and setoption things from the execution part.
_________________________
!

download KiXnet