Show console when using Game.exe

Since I have no knowledge over the win32api, I would like to request instead

I simply want to show console even I play the game using game.exe (not playtest)

Is there any script for that?
I've found this thread as I'm interested as well, but didn't try it myself.
Ahoy worked like a charm. Thanks bud!
I use this, I have added another call to let you set the position of the console window

Code:
module Console  def make    game_title = "Phantasma Novus - Gunslingers of Dawn"    hwnd = Win32API.new('user32.dll', 'FindWindow', 'PP','N').call(0, game_title)    Win32API.new('kernel32.dll', 'AllocConsole', '', '').call    Win32API.new('kernel32.dll', 'SetConsoleTitle', 'P', '').call(game_title + ': Message Console')    cons = Win32API.new('user32.dll', 'FindWindow', 'PP','N').call(0, game_title + ': Message Console')    $stdout.reopen('CONOUT$')    cons = Win32API.new('kernel32', 'GetConsoleWindow', 'V', 'L').call    #This next lines show the console window at the 0,0 position with a size of 640,416    #.call(console,parent_window,x,y,width,height,flag)    Win32API.new('user32.dll','SetWindowPos','LLLLLLL','L').call(cons,hwnd,0,0,640,416,0)    Win32API.new('user32.dll', 'SetForegroundWindow', 'P', '').call(hwnd)  endend
then I just call Console.make on the title scene script

Original thread: https://forums.rpgmakerweb.com/threads/show-console-when-using-game-exe.34999/