Create console.au3

he inline if statements did not work for me so i had to replace them, in addition one constant was missing which i added.
the udf does not work though, having trouble with $tConsoleScreenBufferInfo.SizeX, $tConsoleScreenBufferInfo.SizeY beeing not objects.