Myself and some people I play SMP with had been experiencing frequent crashes/black screens/freezes with Minecraft.exe, aka beta. The standard remedy is to close minecraft beta (henceforth MC) either by waiting a few seconds for the 'Program Not Responding' dialog, or do ctrl+alt+delete. You then have to rerun it, adjust the window size, login, then go to multiplayer/etc. Having to restart every 20-40 minutes, I decided to bone up on my API and write a little app that automates the process. Starting (or restarting) minecraft.exe via my app will close the existing MC window (frozen or not), launch a new one, resize/reposition it to the last known settings, then log in for you. It can also display some limited debug information about MC, including the amount of RAM it's using (the measure windows reports, not the 'F3' value).
The entire program (written in vb6, cue laughter) only needs 108Kb of disk space, does NOT edit the registry or any other files, and does NOT connect to the internet. The only requirement is that it be run from the same folder as minecraft.exe. I originally wrote it for myself, then shared it with my group. The people who've tried it have found it useful, and one of my fellow ops suggested I put it here for a wider audience so here I am. Because it only performs one core function, it also features a fun (optional) little particle sim I whipped up as decoration. The name is a bit of a misnomer, it isn't so much a wrapper as a launch assistant; but it ability to save window settings and accelerate the restarting procedure should make it useful to many people. It can also open a frequently used folder such as "\.minecraft" with a simple button click, making it useful even if minecraft is running just fine.
Documentation/Changelog:
8-29-11
MCWrapper (1.7) By Ghost2
-----------
Change log:
-----------
1.7 (8-29-11):
*Micromode made even smaller; now hides it's title bar.
*Can now right-click uMode's checkbox to close MCW. Handy.
*The MCW window can now be dragged around by it's background, as well as the status label (uMode).
*Added a small button to the right of the uMode box. It toggles Minecraft's titlebar.
1.6 (3-20-11):
*If the shift key is held while MCW is loading, it overrides the 'autostart' option, disabling it.
*Can now hold shift key when clicking 'Run/Reset' to bypass auto-login feature. Good for checking news in new launcher.
*Added a 'fade out' effect if window transparency is less than 70%
1.56(3-2-11):
*Fixed Micromode's titlebar, removed debug artifact.
1.55(3-2-11):
*Merged 'Run' and 'Kill MC' into one button. Makes micromode somewhat smaller.
*Hovering over Quickdir now shows a tooltip listing the target directory.
*Hovering over the MCW window now temporarily increases the transparency if it's below a certain threshold (70%).
*Minimum transparency set from 20% to 11%
*Settings file now named 'MCW.ini' (less ambiguous). You can rename any existing file if you wish to keep it.
*Slight changes to the 'Auto Start' checkbox. Also renamed 'Autorun'.
*Minor optimizations throughout, fixed bug with particle dragging, reduced code by about 8%.
1.5 (2-23-11):
*Detects new launcher (based on file size). Limits the 'login hack' to the old version.
*Any command line parameters sent to MCWrapper will be forwarded to the MC launcher (i.e. username/password/server). Feature does not apply if you're still using the old launcher.
*Debug info shows whether or not new launcher was detected.
*Added a small delay when resizing launcher window to last known settings; should override MC's annoying habit of centering the window after sizing for most users.
*Can now launch Minecraft automatically when MCW starts (this checkbox not visible in micro mode). Shouldn't mess with existing settings files.
1.4 (1-21-11):
*Now waits a bit longer for MC's internals to load before attempting 'login' click. Should make MC crash less often when starting it.
*Now saves/checks version of settings file. May ignore 'old' settings the first time you run it, if applicable.
*Added a 'QuickDir' feature. Can be set/used to open a frequently accessed folder, e.g. "\.minecraft"
1.3 (1-2-11):
*Fixed possible 'false positives' when trying to locate a running Minecraft window. Will correctly locate MC even if another non-MC window has a title of "Minecraft". May also fix rare 'closing explorer' bug.
*Debug pane no longer 'updates' in micromode.
*Pagefile measurement now reflects real page file usage, not pre-allocated
*Re-enabled error handling when loading the settings file
*Particles improved:
-Fixed edge-case that made shift key toggle not always work.
-about 5% reduction in cpu use (relative). Handles 'dead' particles better.
-Frees up unused memory when particles are disabled (~30kb)
1.2 (12-30-10):
*Feature - Added a new 'Micro mode' that makes MCW really tiny. Pauses particles.
*(Hopefully) fixed rare bug where MC would be resized to its default size instead of the one saved
*(Hopefully) fixed bug that could crash MCW if MC was also crashed
*Fixed bug that could cause MCW to become 'invisible' instead of closing outright
*Can no longer launch multiple MC windows. Closes existing window before launching a new one.
1.1 (12-28-10):
*Fix bug where closing MCWrapper while it was minimized would screw it up the next time it was run
*Settings file format changed. Delete the old one if applicable.
*Now checks whether or not MC is running as soon as MCWrapper starts, not 0.5s later
*Now waits up to a second for MC's 'Login' button to load before trying to 'click' it. Should work more often
*When launching Minecraft, the particle simulation is now paused
*Particle simulator has been changed a bit:
-Changed the way that the simulation is advanced. Should have a higher, more stable frame rate
-Right-clicking the particle sub window will toggle between 3 modes; the first is normal, the Second is a black background (~10% faster rendering), and the Third disables the sim altogether
-Clicking the sim window then pressing any key will toggle an FPS counter
-Holding 'Shift' while dragging the left mouse will create a repulsor, rather than an attractor. Repeatedly pressing shift while dragging acts like a toggle
1.0 (12-27-10):
*Initial release
|---------------\
| Release Notes |
|---------------/
This program is a 'window manager' meant to run alongside Minecraft beta. It can start, stop, and restart your 'Minecraft.exe' client. When it launches MC, it will attempt to re-size the window to the last known size and position; if you are using the older launcher (without the news list/etc) it will then try to find and click the 'Login' button, further reducing the hassle involved in restarting your Minecraft Beta client. Under the newer launcher, it can use the built-in login feature (see intallation below). Though originally intended for people who experience frequent crashes, its ability to save the window settings between uses makes it a time/effort saver even for those who don't crash a lot, but dislike having to re-size Minecraft every time they play. Due to its narrow usefulness, I've also incorporated an interactive particle simulator, entirely as decoration.
|--------------\
| Installation |
|--------------/
In order to function correctly, the 'MCWrapper.exe' executable must be placed alongside Minecraft Beta's 'Minecraft.exe' client (I.e. both files must be in the same folder). That's about it. MCWrapper also needs to save a small (4k) settings file. Total disk space required is about 107kb. The 'Src' folder is not required and can be deleted. If you are using the new (post Minecraft 1.3) version of the launcher, you can create a shortcut to MCWrapper.exe with your login info and/or server as "Target:" parameters (e.g. "C:\Users\Ghost2\Desktop\Minecraft\MCWrapper.exe yourname yourpass server"). Omit the 'server' parameter if you want MC to start from the main menu.
|------------\
| How to Use |
|------------/
To use this program, simply start MCWrapper.exe then click 'Run'. If you installed it right, Minecraft beta will pop up and with any luck log in automatically (holding 'shift' before clicking run or restart overrides the auto-login behavior). Clicking the 'Kill' button will immediately close MC, even if it's 'frozen'. Finally, the 'Restart' button will close MC and restart it. This is equivalent to clicking kill then run. If the bottom of the window has green text saying "Minecraft Status: Running" everything should be working fine (especially if Minecraft actually IS running!). This app will work normally whether you use 'Run' to start Minecraft or start it manually, but the resizing/login on start won't work for obvious reasons. To have Minecraft start as soon as MCW starts, simply check the box labeled 'Autorun'. To override the autorun once, click the MCW shortcut (or exe) to select it, hold 'shift', then double click it as you would normally.
A key feature is MCW's auto-login functionality that makes it easier to (re)start Minecraft, depending on which version of the launcher you are using. In the case of the old launcher (pre 1.3) this is accomplished by locating the 'Login' button on the screen, and activating it as if the user clicked it with their mouse. In the case of the new launcher, however, it piggy backs on the new command line settings as outlined on (http://mcupdate.tumblr.com/post/3427294253/welcome-to-the-new-minecraft-launcher). Any command line options passed to MCWrapper.exe (via a shortcut/etc) will be forwarded to minecraft.exe whenever it is started. If you do this with your username and password (as outlined in the installation section above) it will log you in automatically using the new launchers' built-in functionality. Note that MCW does not save this information (or even parse it in any meaningful manner); it just passes it on verbatim.
The 'Show Info' checkbox will show a little box that displays some debug info, including the amount of system memory that Minecraft is using. You can also use the slider at the top to control MCWrapper's transparency.
The particles can be toggled on/no BG/off by right-clicking their subwindow. Left-click pulls them around, shift+lclick pushes; and pressing shift repeatedly while holding down lclick lets you toggle back and forth quickly. Finally, clicking the subwindow and pressing any key but shift toggles an fps counter.
There is also a 'QuickDir' feature. Clicking the yellow 'Set Folder' button will bring up a folder select prompt that let's you pick a folder you open frequently, such as "C:\Users\Name\AppData\Roaming\.minecraft". Once set, the button's caption will then change to 'QuickDir'; Left clicking the aforementioned button will open the selected folder in its own window, like a shortcut. Right clicking the button will bring the 'select' window back up so you can change the stored directory. This only needs to be done once, unless you decide to change it.
Across from the green 'μ' button is a small unlabeled square button. When pressed, it will attempt to toggle the border/titlebar around your minecraft window. Not terribly useful, but it does save a little bit of space.
Finally, the green 'μ' button toggles micro mode (smaller window). In uMode, most of the controls are hidden, and others are moved around. Since the titlebar is hidden, you need to right-click the uMode button if you want to close the MCW window; the window can be moved either by dragging it by the dark grey background, or by the status display (running, unknown, etc).
|------------\
| Known Bugs |
|------------/
Occasionally some features will bork up, particularly resizing and Login clicking. I've made the related code fairly bullet proof so these events should be rare. Sometimes when clicking Kill/Restart, Windows might send the wrong window handle (unique ID) and MCWrapper will close explorer.exe instead. This is very rare, and most users will find that explorer restarts itself automatically. Another very rare bug is that Minecraft may be re-sized into a tiny window, or somewhere off the screen. Simply restarting it manually should fix this. Oftentimes deleting MCW's settings (MCW.ini) can fix persistent problems.
The window position saving will work if Minecraft is 'maximized'; but when you restart it, the window will be in 'normal' mode, just sized to your screen. This difference is negligible.
Cheers.
This tool seems to be very helpful! :smile.gif: Although, I seem to only experience Minecraft crashing when I'm in full screen mode, then I come out of full screen mode to browse the internet. When I come back, Minecraft is usually "Not Responding".
...I seem to only experience Minecraft crashing when I'm in full screen mode, then I come out of full screen mode to browse the internet. When I come back, Minecraft is usually "Not Responding".
I've coded my app under the assumption that minecraft isn't minimized (or at least hadn't been minimized at some time). Not too sure how well it handles fullscreen mode or not. The code is fairly simple, but having a debug mechanism that works with a fullscreen window is tricky. I might be able to add a keyhook that brings up my app with a certain key combo, as well as the ability for it to launch fullscreen. Definitely just added some stuff to my to-do list.
Does anybody know if minecraft.exe has any command line options I might be able to use, like -fullscreen or something?
Well, looks like it handles full-screen pretty well (and partially off screen) already. And having the taskbar visible makes the 'bring up my app' thing less of an issue, at least until they add proper full-screen.
Random thought: Maybe java has an activeX control that holds java windows? I.e. the skin viewer.
I've updated it to work with the new Minecraft Launcher (old launcher still works too). Under the new launcher, I can no longer use my 'Login' clicking trick, instead using the new command line parameters to auto-login (see readme). Just make a shortcut to MCWrapper (if you don't already have one) and feed it the parameters as outlined in the preceding link. When it starts the launcher, MCW will pass these values on.
Regardless of which version you're using, I've also added the option of automatically launching Minecraft when you start MCW. I've added a small delay to the resizing code that should fix MC's habit of centering the window whenever it starts. Probably. This fix might also reduce the odds of MC freezing when you start it. Maybe.
Ok, spent the last few hours working on an update that improves a lot of little things, particularly with the interface. I also did a full code trace, and found a few little bugs I hadn't noticed before. Might update some of those old screenshots.
1.55(3-2-11):
*Merged 'Run' and 'Kill MC' into one button. Makes micromode somewhat smaller.
*Hovering over Quickdir now shows a tooltip listing the target directory.
*Hovering over the MCW window now temporarily increases the transparency if it's below a certain threshold (70%).
*Minimum transparency set from 20% to 11%
*Settings file now named 'MCW.ini' (less ambiguous). You can rename any existing file if you wish to keep it.
*Slight changes to the 'Auto Start' checkbox. Also renamed 'Autorun'.
*Minor optimizations throughout, fixed bug with particle dragging, reduced code by about 8%.
*edit* Messed up some minor code with the minimode. Fixed.
Minor version bump. Added a few overrides that I found useful, cosmetic change too:
1.6 (3-20-11):
*If the shift key is held while MCW is loading, it overrides the 'autostart' option, disabling it.
*Can now hold shift key when clicking 'Run/Reset' to bypass auto-login feature. Good for checking news in new launcher.
*Added a 'fade out' effect if window transparency is less than 70%
Just posted 1.7, which shrinks down micromode even further, adds a few shortcuts as a result, and added the option to toggle minecraft's window border. Been sitting on this one for a long time, but decided to post. Enjoy.
The entire program (written in vb6, cue laughter) only needs 108Kb of disk space, does NOT edit the registry or any other files, and does NOT connect to the internet. The only requirement is that it be run from the same folder as minecraft.exe. I originally wrote it for myself, then shared it with my group. The people who've tried it have found it useful, and one of my fellow ops suggested I put it here for a wider audience so here I am. Because it only performs one core function, it also features a fun (optional) little particle sim I whipped up as decoration. The name is a bit of a misnomer, it isn't so much a wrapper as a launch assistant; but it ability to save window settings and accelerate the restarting procedure should make it useful to many people. It can also open a frequently used folder such as "\.minecraft" with a simple button click, making it useful even if minecraft is running just fine.
Documentation/Changelog:
Download (Includes source):
http://www.mediafire.com/?wb60p6jurza48lb (v1.7)
Older versions:
http://www.mediafire.com/?gp03cbag83t7pcr (v1.6)
http://www.mediafire.com/?6or1cn20ke9ejvc (v1.56)
http://www.mediafire.com/?hctnm9e7i38eb7q (v1.5)
http://www.mediafire.com/?hqhtktpqv31hnuo (v1.4)
http://www.mediafire.com/?gthp4ld04dy9vyd (v1.3)
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
Well Sir, I wanna say thank you. I'm currently using this.
Glad you like it. Let me know if you have any suggestions.
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
I've coded my app under the assumption that minecraft isn't minimized (or at least hadn't been minimized at some time). Not too sure how well it handles fullscreen mode or not. The code is fairly simple, but having a debug mechanism that works with a fullscreen window is tricky. I might be able to add a keyhook that brings up my app with a certain key combo, as well as the ability for it to launch fullscreen. Definitely just added some stuff to my to-do list.
Does anybody know if minecraft.exe has any command line options I might be able to use, like -fullscreen or something?
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
Random thought: Maybe java has an activeX control that holds java windows? I.e. the skin viewer.
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
http://www.minecraftforum.net/viewtopic.php?f=1021&t=212818
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
http://adf.ly/1EDrf
Regardless of which version you're using, I've also added the option of automatically launching Minecraft when you start MCW. I've added a small delay to the resizing code that should fix MC's habit of centering the window whenever it starts. Probably. This fix might also reduce the odds of MC freezing when you start it. Maybe.
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
1.55(3-2-11):
*Merged 'Run' and 'Kill MC' into one button. Makes micromode somewhat smaller.
*Hovering over Quickdir now shows a tooltip listing the target directory.
*Hovering over the MCW window now temporarily increases the transparency if it's below a certain threshold (70%).
*Minimum transparency set from 20% to 11%
*Settings file now named 'MCW.ini' (less ambiguous). You can rename any existing file if you wish to keep it.
*Slight changes to the 'Auto Start' checkbox. Also renamed 'Autorun'.
*Minor optimizations throughout, fixed bug with particle dragging, reduced code by about 8%.
*edit* Messed up some minor code with the minimode. Fixed.
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
1.6 (3-20-11):
*If the shift key is held while MCW is loading, it overrides the 'autostart' option, disabling it.
*Can now hold shift key when clicking 'Run/Reset' to bypass auto-login feature. Good for checking news in new launcher.
*Added a 'fade out' effect if window transparency is less than 70%
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)
MCWrapper - Minecraft window manager
HD128 Texture Pack [WIP]- 16x version
HD Art Pack, (Default Paintings Scaled Up)
16x texture pack (out of date)