How to enable console outside debug mode

Status
Not open for further replies.

TroyZ

The Slayer
Veteran
Joined
Jun 18, 2013
Messages
74
Reaction score
5
First Language
Indonesian
Primarily Uses
RMVXA
console always appear in debug mode when we checked the show console option. but when in game mode (run by clicking Game.exe), the console doesn't appear anymore. how can i make the console also appear when in game mode? is there any way to do it?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
http://forums.rpgmakerweb.com/index.php?/topic/8000-f12-reset-fix/

Code:
def attach_console  # Get game window text  console_w = Win32API.new('user32','GetForegroundWindow', 'V', 'L').call  buf_len = Win32API.new('user32','GetWindowTextLength', 'L', 'I').call(console_w)  str = ' ' * (buf_len + 1)  Win32API.new('user32', 'GetWindowText', 'LPI', 'I').call(console_w , str, str.length)    # Initiate console  Win32API.new('kernel32.dll', 'AllocConsole', '', '').call  Win32API.new('kernel32.dll', 'SetConsoleTitle', 'P', '').call('RGSS Console')  $stdout.reopen('CONOUT$')    # Sometimes pressing F12 will put the editor in focus first,  # so we have to remove the program's name  game_title = str.strip  game_title.sub! ' - RPG Maker VX Ace', ''    # Set game window to be foreground. This is purely for user convenience  hwnd = Win32API.new('user32.dll', 'FindWindow', 'PP','N').call(0, game_title)  Win32API.new('user32.dll', 'SetForegroundWindow', 'P', '').call(hwnd)end# Call this at the beginningattach_console
 
Last edited by a moderator:

TroyZ

The Slayer
Veteran
Joined
Jun 18, 2013
Messages
74
Reaction score
5
First Language
Indonesian
Primarily Uses
RMVXA
it works tsuki :D thanks a lot for your help

anyway this can be closed, this has been solved
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top