Advertisement
Guest User

project thing

a guest
Jun 28th, 2018
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 5.41 KB | None | 0 0
  1. @echo off
  2. title Start
  3. color 1f
  4. :start
  5. echo Do you have a program account?
  6. set /p userin1=
  7. if '%userin1%'=='no' goto new user
  8. if '%userin1%'=='yes' goto begin1
  9. if '%userin1%'=='Yes' goto begin1
  10. if '%userin1%'=='No' goto new user
  11. else echo You did not write "yes" or "no". Please try again, by restarting the file..
  12.  
  13. :new user
  14. title Register
  15. cls
  16. set /p username=Please enter your Username
  17. set /p password=Please enter your Password
  18. echo %username%>username.txt
  19. echo %password%>password.txt
  20. cls
  21. goto begin1
  22.  
  23. :old user
  24. goto password
  25.  
  26. :begin1
  27. cls
  28. title Log In
  29. set /p userin2=<username.txt
  30. set /p userin3=<password.txt
  31. set /p userin4=Username:
  32. set /p userin5=Password:
  33. if '%userin4%'=='%userin2%' goto password
  34. if not '%userin4%'=='%userin2%' goto begin1
  35.  
  36. :password
  37. if '%userin5%'=='%userin3%' goto begin2
  38. if not '%userin5%'=='%userin3%' goto begin2
  39. if not '%userin5%'=='%userin3%' goto begin1
  40.  
  41. :begin2
  42. cls
  43. title Choose App
  44. echo Welcome %userin2%
  45. echo Currently we only have three apps. Please write:
  46. echo [c] then enter to open Calculator
  47. echo [g] then enter to open Guessing Game
  48. echo [s] then enter to open Site Selector.
  49. set /p pressed=
  50. if %pressed%==c goto calculator
  51. if %pressed%==g goto guessgame
  52. if %pressed%==s goto siteselector
  53. else echo Sorry, but this app is not yet made.
  54.  
  55. :calculator
  56. title Batch Calculator
  57. color 1f
  58. cls
  59. :top1
  60. echo --------------------------------------------------------------
  61. echo Welcome to Batch Calculator
  62. echo --------------------------------------------------------------
  63. echo NOTE: Only works on whole numbers
  64. echo Please write a calculation, then press enter.
  65. echo .
  66. set /p sum=
  67. set /a ans=%sum%
  68. echo.
  69. echo = %ans%
  70. echo --------------------------------------------------------------
  71. pause
  72. cls
  73. echo Previous Answer: %ans%
  74. goto top1
  75. cls
  76.  
  77. echo Would you like to go back to choosing apps?
  78. echo NOTE: saying "no" will run the game again
  79. set /p pressed=
  80. if '%userin1%'=='no' goto calculator
  81. if '%userin1%'=='yes' goto begin2
  82. if '%userin1%'=='Yes' goto begin2
  83. if '%userin1%'=='No' goto calculator
  84.  
  85.  
  86. :guessgame
  87. cls
  88. color 0e
  89. title Guessing Game
  90. set /a guessnum=0
  91. set /a answer=%RANDOM%
  92. set variable1=surf33
  93. echo -------------------------------------------------
  94. echo Welcome to the Guessing Game!
  95. echo.
  96. echo Try and Guess my Number!
  97. echo -------------------------------------------------
  98. echo.
  99. :top2
  100. echo.
  101. set /p guess=
  102. echo.
  103. : Don't worry I barely understood this part either
  104. if %guess% GTR %answer% ECHO Lower!
  105. if %guess% LSS %answer% ECHO Higher!
  106. if %guess%==%answer% GOTO EQUAL
  107. set /a guessnum=%guessnum% +1
  108. if %guess%==%variable1% ECHO Found the backdoor hey?, the answer is: %answer%
  109. goto top2
  110. :equal
  111. echo Congratulations, You guessed right!!!
  112. echo.
  113. echo It took you %guessnum% guesses.
  114. echo.
  115. pause
  116. cls
  117. echo Would you like to go back to choosing apps?
  118. echo NOTE: saying no will run the game again
  119. set /p pressed=
  120. if '%userin1%'=='no' goto guessgame
  121. if '%userin1%'=='yes' goto begin2
  122. if '%userin1%'=='Yes' goto begin2
  123. if '%userin1%'=='No' goto guessgame
  124.  
  125. :siteselector
  126. cls
  127. color 2f
  128. title Site Selector
  129. :top3
  130. echo ***************************************************************
  131. echo.
  132. echo Site Selector
  133. echo.
  134. echo ***************************************************************
  135. echo.
  136. echo Key:
  137. echo [1] Google - Search Engine
  138. echo [2] Gmail - Email Service
  139. echo [3] Yahoo - Search Engine/Mail Server
  140. echo [4] Facebook - Social Networking
  141. echo [5] Myspace - Social Networking
  142. echo [6] BBC - News
  143. echo [7] Weather - Weather
  144. echo [8] WikiHow - A How-To Website
  145. echo [9] Instructables - A How-To Website
  146. echo [10] YouTube - Online Videos
  147. echo [11] Answers - Online Encyclopedia
  148. echo [12] Wikipedia - Online Encyclopedia
  149. echo.
  150. echo [e] Exit
  151. echo.
  152. echo ***************************************************************
  153. echo Enter the number of the website which you would like to go to:
  154. echo.
  155. set /p udefine=
  156. echo.
  157. echo ***************************************************************
  158. if %udefine%==1 start www.google.com
  159. if %udefine%==2 start www.gmail.com
  160. if %udefine%==3 start www.yahoo.com
  161. if %udefine%==4 start www.facebook.com
  162. if %udefine%==5 start www.myspace.com
  163. if %udefine%==6 start www.bbc.co.uk
  164. if %udefine%==7 start www.weather.com
  165. if %udefine%==7 start www.wikihow.com
  166. if %udefine%==9 start www.instructables.com
  167. if %udefine%==10 start www.youtube.com
  168. if %udefine%==11 start www.answers.com
  169. if %udefine%==12 start www.wikipedia.com
  170. if %udefine%==e goto exit
  171.  
  172. cls
  173. echo ***************************************************************
  174. echo.
  175. echo Thank You for using Site Selector
  176. echo.
  177. echo ***************************************************************
  178. echo Type [e] to exit, [b] to go back and select another site, or [c] to select a different application.
  179. echo.
  180. set /p udefine=
  181. echo.
  182. echo ***************************************************************
  183. if %udefine%==b goto top3
  184. if %udefine%==e goto exit
  185. if %udefine%==c goto begin2
  186. :exit
  187. cls
  188. echo ***************************************************************
  189. echo.
  190. echo Thank You for using Site Selector
  191. echo.
  192. echo ***************************************************************
  193. pause
  194. cls
  195. echo Would you like to go back to choosing apps?
  196. echo NOTE: saying no will run the game again
  197. set /p pressed=
  198. if '%userin1%'=='no' goto siteselector
  199. if '%userin1%'=='yes' goto begin2
  200. if '%userin1%'=='Yes' goto begin2
  201. if '%userin1%'=='No' goto siteselector
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement