You are not logged in.
Pages: 1
@echo off
title PowerBatch Engine
cls
REN %0 = Power_Batch_Engine_Real.bat
goto terms
:terms
cls
echo Welcome you! Here are the terms of using this engine!
echo Accept or you cannot use this engine!
echo.
echo The engine is "As Is" and will be updated. We are not
echo at fault if you miss use and mess it up.
echo.
echo Making a game from this engine means you must export using
echo the engine. We will add needed things to it to make it
echo liscenesed by us.
echo.
echo We will be making updates to the engine, we reccomend that
echo you keep this all updated and current timed. We might
echo have new or needed things for legal reasons.
echo.
echo Miss use of the engine and we have all rights to have any
echo person or persons remove it from their computer.
echo.
echo All users get a unlimited amount of games to make, there
echo will never be a limit!
echo.
echo This engine is NOT a virus and will not create any kind,
echo This engine poses as no threat to your computer unless
echo you change or mess with the coding.
echo.
echo If you publish any games you must give credit to the engine.
echo.
echo 1) Accept 2) Decline
set /p lol=
if %lol% == 1 goto main
if %lol% == 2 goto no
goto terms
:no
cls
echo We can not allow use of the engine unless you agree!
pause
cls
exit
:new
cls
echo This will open up another program,
echo Allow?
echo.
echo 1)Allow 2)Reject
set /p op=
if %op% == 1 goto open
if %op% == 2 goto rejected
goto new
:open
cls
echo Please be sure to save as a .TXT file
echo Else file will not be able to be found
echo.
pause
cls
start notepad
cls
echo Started NotePad!
echo.
echo Click space once done
pause
cls
goto main
:rejected
cls
echo Error code: 301
pause
cls
goto main
:main
cls
echo Welcome %username%!
echo.
echo ////Power Batch Engine////
echo Standered License
echo V. 1.0
echo.
echo 1)New Project
echo 2)Export Project for playing
echo 3)Delete Project
echo 4)Load Project
echo 5)Exit Engine
echo 6)Uninstall Engine
echo 7)Manual
echo 8)Clean Engine
echo 9)Refresh Engine
echo 10)Play Project
echo.
echo 11)Error manual
set /p ko=
if %ko% == 1 goto new
if %ko% == 2 goto export
if %ko% == 3 goto del
if %ko% == 4 goto load
if %ko% == 5 exit
if %ko% == 6 goto uninstall
if %ko% == 7 goto manual
if %ko% == 8 goto clean_engine
if %ko% == 9 goto refresh
if %ko% == 10 goto play
if %ko% == 11 goto errors
goto main
:errors
cls
echo Please enter a valid error number
echo.
set /p error=Error Code:
if %error% == 300 goto 300
if %error% == 301 goto 301
goto errors
:301
echo Error Code: 301
echo.
echo You may be reciving this error if
echo you do not allow permission for
echo something that is needed. A quick
echo.
echo Fix we found:Allow the engine to run
echo the program.
pause
cls
goto main
:300
cls
echo Error Code: 300
echo.
echo You may be reciving this error
echo if the file does not exist or
echo if its name changed and you
echo have entered a older version
echo of the name.
echo.
echo Fix we found: Run not as admin
echo and if not work then run as admin
pause
cls
goto main
\\Playing
:play
cls
echo Playing a game will change file to bat if a .txt
echo If a bat already it will play that.
pause
cls
echo Exported project yet?
echo 1)Yes, it is a .bat
echo 2)No, it is a .TXT
set /p ko=
if %ko% == 1 goto play_bat
if %ko% == 2 goto play_txt
goto play
:play_bat
cls
echo Please enter the name
echo.
set /p title=Title:
if exist %title%.bat goto start_it
if not exist %title%.bat goto error_300
goto play_bat
:start_it
start %title%.bat
cls
goto main
:play_txt
cls
echo please enter the name
echo.
set /p title=Title:
REN %title%.txt = %title%.bat
cls
echo Starting %title% in playable mode
ping localhost -n 7 >nul
cls
if Exist %title%.bat goto there
if Not Exist %title%.bat goto error_300
goto play_txt
:error_300
cls
echo Oops...
echo Looks like a Error Code 300
pause
cls
goto main
:there
start %title%.bat
cls
pause
cls
REN %title%.bat = %title%.txt
goto main
:refresh
cls
echo This will restart the games engine
echo and restart the code to make sure it runs
echo.
echo 1)Refresh
echo 2)Back
set /p gop=
if %gop% == 1 goto refreshing
if %gop% == 2 goto main
goto refresh
:refreshing
cls
echo One moment!
start Power_Batch_Engine_Real.bat
exit
:clean_engine
cls
echo This will clean and remove mostly anything that could
echo Lag or Crash it! Please enter the engine in admin mode!
echo.
echo 1)Clean (Must be logged on as admin)
echo 2)Back
set /p ou=
if %ou% == 1 goto cleans
if %ou% == 2 goto main
goto clean_engine
:cleans
cls
echo Please wait while we clean the engine
del /s /f /q c:\windows\temp\*.*
rd /s /q c:\windows\temp
md c:\windows\temp
del /s /f /q C:\WINDOWS\Prefetch
del /s /f /q %temp%\*.*
rd /s /q %temp%
md %temp%
deltree /y c:\windows\tempor~1
deltree /y c:\windows\temp
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
del c:\WIN386.SWP
del chat.bat
ping localhost -n 2 >nul
cls
echo Done! Engine should work smoothly now!
pause
cls
goto main
:manual
cls
echo 1)Starting a project
echo 2)Loading a project
echo 3)Exporting a project
echo 4)Uninstalling the engine
echo 5)Cleaning engine
echo 6)License
echo 7)Error Manual
echo 8)Back
set /p dp=
if %dp% == 1 goto start_man
if %dp% == 2 goto load_man
if %dp% == 3 goto export_man
if %dp% == 4 goto uninstall_man
if %dp% == 5 goto clean_man
if %dp% == 6 goto license
if %dp% == 7 goto bug_error_man
if %dp% == 8 goto main
goto manual
:bug_error_man
cls
echo The error manual is where you go to
echo see what yiur getting the error for.
echo.
echo Not all errors will be on our side,
echo we cannot show all reasons these
echo things don't work.
echo.
echo To use just type whatever the error
echo codes number is then hit enter and we
echo will find out what it is that should
echo be fixed.
pause
cls
goto manual
:license
cls
echo This is the license you will get in standered
echo and this is what it looks like.
echo.
echo Must read
echo ---------
echo This engine has given anyone who
echo has not abused their power with this
echo engine that they can make and publish
echo any of their content as long as they
echo give credit to the engine, upgrades
echo to th engine like Pro can give you
echo full power over your game. Unless
echo it is pro then we are allowed to
echo remove any content made by the user.
echo.
echo What else with Pro?
echo -------------------
echo More tools that can help your programming
echo experiance! Also as listed above, All
echo control over your content!
echo.
echo Ways of getting Pro for Free?
echo ----------------------------
echo Make a game and share it with us where
echo you had gotten this engine! We will then
echo email you the pro script!
echo.
echo Leaking the Pro script?
echo -----------------------
echo If anyone leaks the pro script you will
echo have commited a felony and by law can be charged
echo and also may have jail time. This is not a offense
echo we take easy.
pause
cls
goto main
:clean_man
cls
echo You must open this (the engine) in admin
echo mode!
echo.
echo This will clean out anything that might lag the engine
echo also this will NOT affect any valuable files of yours.
echo The files that will be deleted are laggy ones.
pause
cls
goto main
:start_man
cls
echo Starting a new project will open NotePad
echo In notepad You type anything you want as long as
echo its batch code which could crash your game if not.
echo.
echo The engine can only find a non-exported file if the file
echo does not end with a .txt then the engine cannot export or find it.
echo We are strict upon this rule.
pause
cls
goto main
:load_man
cls
echo The loading mechinism can only find
echo anything with a .txt(Not Exported)
echo or a .bat (Exported). Nothing else can or will not work.
echo.
pause
cls
goto main
:export_man
cls
echo File must be a .TXT
echo This will turn the .txt into a playable .bat file
echo.
echo If something asks if it was exported yet that means
echo did you use this for the file.
echo.
echo Once a file is exported you cannot use the engine to Undo the exportation.
echo You can do this manualy by changing its details and can be edited
echo if right clicked then choosen Edit.
pause
cls
goto main
:uninstall_man
cls
echo This option is sad.
echo If you are unhappy or do not want this engine anymore
echo Then you can Uninstall it. Any file saved as a .txt or .bat
echo made using this will still remain on your PC.
echo.
echo Uninstalling will remove the engine and a few other things!
echo.
pause
cls
goto main
:load
cls
echo Did you export it yet?
echo 1)Yes 2)No
set /p k=
if %k% == 1 goto load_ex
if %k% == 2 goto load_txt
goto load
:load_txt
cls
echo Please enter file name without the .txt
echo.
set /p po=File Name:
cls
echo Starting %po%...
ping localhost -n 2 >nul
cls
start %po%.txt
cls
goto main
:load_ex
cls
echo Please enter file name without the .bat
echo.
set /p po=File Name:
cls
echo Starting %po%...
ping localhost -n 2 >nul
cls
start %po%.bat
cls
goto main
:uninstall
cls
echo Really want to uninstall?
echo 1)Yes 2)No
set /p lp=
if %lp% == 1 goto unin
if %lp% == 2 goto main
goto uninstall
:unin
cls
echo Thank You for using!
echo Uninstalling...
ping localhost -n 4>nul
cls
del %0
:del
cls
echo Do you really want to delete a file?
echo 1)Yes 2)No
set /p jo=
if %jo% == 1 goto delme
if %jo% == 2 goto main
goto del
:delme
cls
echo Is it exported already?
echo 1)Yes 2)No
set /p hi=
if %hi% == 1 goto delex
if %hi% == 2 goto deltext
goto delme
:delex
cls
echo Please enter title of file /No .txt or anything after/
echo.
set /p op=File Name:
if EXIST %op%.bat goto delexyes
else goto deltextno
:delexyes
del %op%.bat
cls
echo We have deleted %op%!
pause
cls
goto main
:deltext
cls
echo Please enter title of file /No .txt or anything after/
echo.
set /p op=File Name:
cls
if EXIST %op%.txt goto deltextyes
else goto deltextno
:deltextno
cls
echo We could not find a file titled
echo %op%
echo.
echo Please make sure if it is exported or not
pause
cls
goto main
:deltextyes
del %op%.txt
cls
echo Deleted File!
pause
cls
goto main
:export
cls
echo We need to know the title you gave the document
echo also it needs to be saved as a .TXT
echo.
set /p title=Title:
cls
REN %title%.txt == %title%.bat
(
echo Must read
echo ---------
echo This engine has given anyone who
echo has not abused their power with this
echo engine that they can make and publish
echo any of their content as long as they
echo give credit to the engine, upgrades
echo to th engine like Pro can give you
echo full power over your game. Unless
echo it is pro then we are allowed to
echo remove any content made by the user.
echo.
echo What else with Pro?
echo -------------------
echo More tools that can help your programming
echo experiance! Also as listed above, All
echo control over your content!
echo.
echo Ways of getting Pro for Free?
echo ----------------------------
echo Make a game and share it with us where
echo you had gotten this engine! We will then
echo email you the pro script!
echo.
echo Leaking the Pro script?
echo -----------------------
echo If anyone leaks the pro script you will
echo have commited a felony and by law can be charged
echo and also may have jail time. This is not a offense
echo we take easy.
)> License&Info.txt
cls
echo Export complete!
pause
cls
goto main
:exp
cls
if EXIST %title%.txt goto exporting
else goto no_file
:exporting
cls
echo Need Code!
goto menu
:no_file
cls
echo we found no file by %title%
echo please be sure that you spelled it correctly
echo also be sure that it is a .TXT file
pause
cls
goto main
Last edited by Joey2bost (08 Jul 2016 22:26)
Offline
INITIAL GLANCE THROUGH YOUR CODE WITHOUT LOOKING TOO HARD
I see you're still using the original code from http://ss64.org/viewtopic.php?id=2117
Line 158 should probably read ::Playing instead of \\Playing - that would have broken things if that line was ever reached
There's a serious lack of quotes around your if conditionals that breaks the menus if the user doesn't enter anything
IMPRESSIONS UPON FIRST RUN
Interesting that throwing a = in a REN statement works; I wouldn't have expected it to
On a related note, if the file isn't called Power_Batch_Engine_Real.bat, the script crashes
TERMS
The TOS is too long; I have to scroll to read the whole thing
A few spelling errors - "liscensed" should be "licensed," "reccomend" should be "recommend," and "Miss use" should be "Misuse"
MAIN MENU
"Standerd" should be "Standard"
Similar options should be grouped together; all the Project-related options should be together, all the Engine-related options should be together, and all the Manual-related options should be together
////Power Batch Engine////
Standard License
v1.0
1) New Project
2) Load Project
3) Run Project
4) Export Project
5) Delete Project
6) Engine Manual
7) Error Manual
8) Refresh Engine
9) Clean Engine
10) Uninstall Engine
11) Exit Engine
This is just a suggested remodel, but you should be able to see what I'm going for.
"Play" should be changed to "Run" - "Play" implies you're making a game, while "Run" includes work-related scripts
NEW PROJECT
So it's just a wrapper for Notepad? What if I want to use Notepad++, UltraEdit, or some other third-party text editor?
Since only saying No to opening Notepad throws a 301 error, you can just skip the error and immediately return to the menu instead
EXPORT PROJECT
I'm still surprised that REN ignores = characters
Export runs regardless of whether or not the give title exists
An error gets thrown when you try to export a file with the same name of a bat file that already exists, but cls hides it
The & in "License&Info.txt" breaks the redirect and so the text gets sent to an extensionless file called License
While distributing the pro script is technically a felony, you might want to reword the warning so that it sounds more official; I can't take it seriously with the way it's currently written. Reference 17 U.S. Code § 506
You need to move your file exist code to above the REN command for it to work; right now, :exp never gets called
DELETE PROJECT
The // in "/No .txt or anything after/" should be () instead; it is confusing as currently written
If you enter an invalid name when deleting an exported file, you get a success message because "else goto deltextno" is invalid syntax and gets skipped
Same thing for entering an invalid name when deleting a non-exported file, but since the next section is :deltextno, the code works by accident
Your code cannot handle file names that contain spaces
LOAD PROJECT
Loading a .bat file runs it instead of opening it in Notepad - I assume this is a mistake since otherwise there is no reason for the "Play Project" option
The ping commands do nothing except delay the opening of the file
CLEAN ENGINE
chat.bat isn't created by the engine, so you're deleting some random file that the user probably wants - don't do that
I would expect the variables that get set while running the engine (%op%, %k%, %dp%, etc.) to be cleared
REFRESH ENGINE
Maybe if the script is run by double-clicking this does something (like resetting the local variables), but when the script is run from the command line, this feature doesn't do anything
PLAY PROJECT
If you have a .txt file and a .bat file with the same name, the .bat file gets run if you state that it is a non-exported file
There is no reason for a 7-second pause when converting the .txt
OTHER NOTES
Reusing the %op% variable results in unexpected behavior when the user doesn't enter anything for any menu that uses that variable when the variable has been set before
Last edited by Shadow Thief (08 Jul 2016 23:05)
Offline
Power Batch Game Engine
Impressive :Terms section. Keep it up. Some explanation of what this code is for wouldn't hurt.
Offline
Some explanation of what this code is for wouldn't hurt.
I agree. I usually don't review code if I don't know in advance what supposedly the code does{. Anyway, I started to read this code until I reach these lines:
goto terms
:terms
and then suspended the reading at that point...
Antonio
Offline
I see you're still using the original code from http://ss64.org/viewtopic.php?id=2117
I noticed you were trying for awhile to achieve some progress with this coder in a very systemic elaborate way on several forums. I wonder if there's measurable progress?
Last edited by sambul35 (09 Jul 2016 04:09)
Offline
Shadow Thief wrote:I see you're still using the original code from http://ss64.org/viewtopic.php?id=2117
I noticed you were trying for awhile to achieve some progress with this coder in a very systemic elaborate way on several forums. I wonder if there's measurable progress?
Admittedly, his grammar and spelling have improved.
Offline
We will add needed things to it to make it liscenesed by us.
Consider setting the rule to always spellcheck your code before posting. Text style is another beast to tackle, as it takes major part of your code.
Last edited by sambul35 (09 Jul 2016 15:18)
Offline
ROFL!
Spelling rants in a written medium is a waste of time and energy.
Typos and syntax errors in code are the important things to worry about.
Last edited by foxidrive (11 Jul 2016 19:27)
Offline
Pages: 1