Dicecaster Posted January 3, 2011 Share Posted January 3, 2011 (edited) So, I play a lot of computer games, and I decided that I wanted to make a program that let me catalog all the games I own. Thankfully, batch scripting did the trick. Here it is: @echo offtitle Game Explorercolor 0a :commandclsecho Commands:echo,echo list - shows a complete list of catalogued games.echo add - walks you throught the process of cataloguing a new game.echo view - view the information of the specified game.echo delete - delete a game from the database.echo color - change the background and text colorsecho info - displays information about Game Explorer.echo,set /p cmnd=Enter command: clsif "%cmnd%"=="list" goto listif "%cmnd%"=="add" goto addif "%cmnd%"=="view" goto viewif "%cmnd%"=="delete" goto deleteif "%cmnd%"=="color" goto colorif "%cmnd%"=="exit" exitif "%cmnd%"=="info" ( goto info) else ( goto command) :listtree /f c:\gamespausegoto command :addset /p name=What is the game's name? set /p genre=To what genre does the game belong? set /p descrip=If you'd like, enter a description for the game: echo Name: %name% > "c:\games\%name%"echo Genre: %genre% >> "c:\games\%name%"echo Description: %descrip% >> "c:\games\%name%"goto command :viewset /p game=What game would you like to view? if exist "c:\games\%game%" ( cls type "c:\games\%game%") else echo That game doesn't exist or you made a typing error.echo,pausegoto command :deleteset /p game=What game file do you want to delete? del "c:\games\%game%"goto command :colorecho Here are the color codes:echo 0 = Black 8 = Grayecho 1 = Blue 9 = Light Blueecho 2 = Green A = Light Greenecho 3 = Aqua B = Light Aquaecho 4 = Red C = Light Redecho 5 = Purple D = Light Purpleecho 6 = Yellow E = Light Yellowecho 7 = White F = Bright Whiteset /p b=Enter the background color: set /p f=Enter the text color:color %b%%f%goto command :infoecho Game Explorer is a small program that allows you to catalogue and view computer games. I've created it so that you can view all your games in a breeze. It comes with six commands: list, add, view, delete, info, and color. List shows you a list of all the games you've catalogued using Game Explorer. Add allows you to catalogue individual games, guiding you through the process. It can also be used to rewrite previously catalogued games. View displays information about a game you specify, if it exists (like start). Delete works like view, except it deletes the information for one of the games. And you know what info does. Color guides you through a process to change the color of the background and the color of the text.echo,echo Note: When writing the title in the game-adding process, don't use special characters (colon, exclamation mark, etc.). These will cause errors to occur. echo,pausegoto command So, tell me what you think. Oh, and when I try to add a game, when I use a colon in the title it erases all the other data I input for that game. Does anyone know how I can fix this (or at least why it happens)? Edited January 4, 2011 by Dicecaster Link to comment Share on other sites More sharing options...
CommanderCrazy Posted January 4, 2011 Share Posted January 4, 2011 :oI do not understand... Link to comment Share on other sites More sharing options...
HellsMaster Posted January 4, 2011 Share Posted January 4, 2011 what CC said...:o Link to comment Share on other sites More sharing options...
Dicecaster Posted January 4, 2011 Author Share Posted January 4, 2011 (edited) First, go to "My Computer", open drive C (C:\), and make a folder called "GAMES". Then copy and paste it into Notepad, save it as "anything.bat" and start it. Type "info", hit enter, and it will explain how it all works. P.S. I changed the script so it will work with these instructions. Edited January 4, 2011 by Dicecaster Link to comment Share on other sites More sharing options...
HellsMaster Posted January 4, 2011 Share Posted January 4, 2011 (edited) nice.. how about you make a program? with a nice interface? with images and stuff? Edit: have a look at the attachment, a prezzie for you! Edited January 4, 2011 by HellsMaster Link to comment Share on other sites More sharing options...
Dicecaster Posted January 4, 2011 Author Share Posted January 4, 2011 nice.. how about you make a program? with a nice interface? with images and stuff? Edit: have a look at the attachment, a prezzie for you!If you look at my signature, it has a link to the AKH Batch File to EXE Converter. I used that to make it into an actual program (using the blue icon). I don't know of any icons that would be suitable, but I think I'll look around. Thanks. P.S. I didn't know that they would allow you to attach .zip files. I would probably have put the .exe in, but it doesn't allow you too. Thanks. Link to comment Share on other sites More sharing options...
Dicecaster Posted January 4, 2011 Author Share Posted January 4, 2011 Scratch that, it allows all attachment files. It just doesn't allow attachments for signatures. Here's my .exe: Extract it. See the blue icon? P.S. How'd you make yours into an application? Link to comment Share on other sites More sharing options...
HellsMaster Posted January 4, 2011 Share Posted January 4, 2011 I used a tool. Thats what i used: http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.htmllet me find a good icon for you Link to comment Share on other sites More sharing options...
Dicecaster Posted January 4, 2011 Author Share Posted January 4, 2011 I used a tool. Thats what i used: http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.htmllet me find a good icon for youAlright, thanks. I really meant it just for personal use, but if you find a good icon, thanks a lot. Actually, if you happen to know anywhere where I can "publish" programs I make (batch or other), please let me know. Link to comment Share on other sites More sharing options...
TheTerminator2004 Posted January 5, 2011 Share Posted January 5, 2011 (edited) You'd probably do better to use a more functional programming language for something like this. Using ancient MS-DOS batch scripts seems a little silly, and is a lot of extra effort for nothing. Try writing it in C# or Java - you can probably do the same kind of thing much better, in less lines of code, and can add in all kinds of extra functionality with ease. If you're using C# in Visual Studio, or Java in Netbeans IDE, you can do a GUI pretty quickly too. Windows Vista and 7 have a game explorer which does something very similar, but adds games automatically when they're installed. It does have a habit of not adding all games though, and theres no way to manually add them that I know of, so this could come in handy if it had equivalent functionality to the default windows one. Edited January 5, 2011 by The_Terminator Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now