ahwi420
18th April 2006, 02:14
• Found this one at openkore forums.. really helps a lot for me. hope yours too..
• Mods, please do inform me if this has been posted before.. just wanted to share.. thankx
• You can edit openkore.pl by yourself and for the lazy ones, i have my own .pl attached on this thread.
Auto-hide Openkore Console Window
Credit goes to hakore of openkore forums
1. Open openkore.pl using Notepad.
2. Find the lines:
Plugins::callHook('initialized');
$interface->mainLoop();
3. Replace them with these lines and save:
Plugins::callHook('initialized');
if ($timeout{hideConsole_auto}{timeout}) {
Log::message("Auto-hiding console in $timeout{hideConsole_auto}{timeout} seconds...\n");
Log::message("Hide the console? (Y/n) ");
$timeout{hideConsole_auto}{time} = time;
my $msg = $interface->getInput($timeout{hideConsole_auto}{timeout});
if ($msg =~ /y/i || $msg eq "") {
Log::message("Hiding the console\n\n");
eval 'use Win32::Console;Win32::Console->new(STD_OUTPUT_HANDLE)->Free();';
} else {
Log::message("Cancelled auto-hide of console\n\n");
}
undef $msg;
}
$interface->mainLoop();
4. Add a new option in your control/timeouts.txt:
hideConsole_auto 10
This specifies the number of seconds Kore will wait before automatically hiding the console. If you press any key other than "y", Kore will not hide the console.
Note: You can use any value for this option.
Additional Notes:
1. This will simply hide the console and you will not be able to control the bot while it's running in the background (lame workaround to hide your bot). For clarification, there will be no icon in the system tray when you use this (as the statement says "minimize to system tray").
2. After you hide the console, you can only turn off the bot by ending the process using Task Manager (dangerous).
• For this one, i use pRO client with another character to logout safely.
• I send the bot a message with it's Admin Password.
• Then i just type "logout" and thats it!
3. It only works if you are using the 'Console' interface (why use Wx anyways if you're just gonna hide it?).
Hope this one will help you. ;)
• Mods, please do inform me if this has been posted before.. just wanted to share.. thankx
• You can edit openkore.pl by yourself and for the lazy ones, i have my own .pl attached on this thread.
Auto-hide Openkore Console Window
Credit goes to hakore of openkore forums
1. Open openkore.pl using Notepad.
2. Find the lines:
Plugins::callHook('initialized');
$interface->mainLoop();
3. Replace them with these lines and save:
Plugins::callHook('initialized');
if ($timeout{hideConsole_auto}{timeout}) {
Log::message("Auto-hiding console in $timeout{hideConsole_auto}{timeout} seconds...\n");
Log::message("Hide the console? (Y/n) ");
$timeout{hideConsole_auto}{time} = time;
my $msg = $interface->getInput($timeout{hideConsole_auto}{timeout});
if ($msg =~ /y/i || $msg eq "") {
Log::message("Hiding the console\n\n");
eval 'use Win32::Console;Win32::Console->new(STD_OUTPUT_HANDLE)->Free();';
} else {
Log::message("Cancelled auto-hide of console\n\n");
}
undef $msg;
}
$interface->mainLoop();
4. Add a new option in your control/timeouts.txt:
hideConsole_auto 10
This specifies the number of seconds Kore will wait before automatically hiding the console. If you press any key other than "y", Kore will not hide the console.
Note: You can use any value for this option.
Additional Notes:
1. This will simply hide the console and you will not be able to control the bot while it's running in the background (lame workaround to hide your bot). For clarification, there will be no icon in the system tray when you use this (as the statement says "minimize to system tray").
2. After you hide the console, you can only turn off the bot by ending the process using Task Manager (dangerous).
• For this one, i use pRO client with another character to logout safely.
• I send the bot a message with it's Admin Password.
• Then i just type "logout" and thats it!
3. It only works if you are using the 'Console' interface (why use Wx anyways if you're just gonna hide it?).
Hope this one will help you. ;)