Advertisement
emil20013

emil2003 EMILS MACHINE

Dec 4th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.14 KB | None | 0 0
  1. #import
  2. import tkinter as tk
  3. from tkinter import ttk
  4. from subprocess import call
  5. import os
  6. import time
  7. import webbrowser
  8.  
  9. #start up
  10. print("Welcome to Emils machine")
  11. time.sleep(1)
  12. print("Please leave feedback on what you want me to add!")
  13. time.sleep(1)
  14. print("Do 'help' if you want a few commands you can do!'")
  15. time.sleep(1)
  16. print("Login [L]")
  17. print("Register [R]")
  18. start = input("")
  19.  
  20. while True:
  21. if start == 'R':
  22. RegUSER = input("Create Username: ")
  23. RegPASS = input("Create Password: ")
  24. RegPassFile = open("Pass.txt","a")
  25. RegUserFile = open("Users.txt","a")
  26. RegUserFile.write("" + RegUSER + "" + RegPASS + "\n")
  27. RegUserFile.close()
  28. RegPassFile.close()
  29. print("You have now created an account")
  30. print("Your username is " "'" + RegUSER + "'" " Your password is " "'" + RegPASS + "'" "")
  31. break
  32. elif start == 'L':
  33. LoginUSER = input("Input Username: ")
  34. LoginPASS = input("Input Password: ")
  35. print("you have been logged in as " "'" + LoginUSER + "'")
  36. break
  37. else:
  38. print("try that again!")
  39. print("Login [L]")
  40. print("Register [R]")
  41. start = input("")
  42. if start == 'R':
  43. RegUSER = input("Create Username: ")
  44. RegPASS = input("Create Password: ")
  45. RegPassFile = open("Pass.txt","a")
  46. RegUserFile = open("Users.txt","a")
  47. RegUserFile.write("" + RegUSER + "" + RegPASS + "\n")
  48. RegUserFile.close()
  49. RegPassFile.close()
  50. print("You have now created an account")
  51. print("Your username is " "'" + RegUSER + "'" " Your password is " "'" + RegPASS + "'" "")
  52. elif start == 'L':
  53. LoginUSER = input("Input Username: ")
  54. LoginPASS = input("Input Password: ")
  55. print("you have been logged in as " "'" + LoginUSER + "'")
  56.  
  57.  
  58.  
  59.  
  60.  
  61. #define into variable
  62. def google():
  63. time.sleep(1)
  64. print("opening google")
  65. time.sleep(2)
  66. google = input("Google Search: ")
  67. webbrowser.open_new_tab('http://www.google.com/search?btnG=1&q=%s' % google)
  68.  
  69. def hcmd():
  70. print("Commands You Can Use: ")
  71. time.sleep(1)
  72. print("open google")
  73. print("open paint")
  74. print("open cmd")
  75. print("help")
  76. print("feedback")
  77.  
  78. def ocmd():
  79. call(["cmd.exe"])
  80.  
  81. def paint():
  82. call(["mspaint.exe"])
  83.  
  84. def feedback():
  85. print("Thanks for your feedback!")
  86.  
  87. def admin():
  88. AdminPASS = input("Type the administrator password here: ")
  89. print("You now have permission for everything")
  90. time.sleep(1)
  91. print("e.g. Currency, balance...")
  92.  
  93.  
  94.  
  95. #commands
  96. while True:
  97. cmd = input("cmd: ")
  98. if cmd == "open google":
  99. google()
  100. elif cmd == "help":
  101. hcmd()
  102. elif cmd == "open cmd":
  103. ocmd()
  104. elif cmd == "open paint":
  105. paint()
  106. elif cmd == "feedback":
  107. Feedback = input("Write what you think I should add: ")
  108. feedback()
  109. FeedFile = open("feedback.txt","a")
  110. FeedFile.write("Feedback: " + Feedback + "\n")
  111. FeedFile.close()
  112. elif cmd == "admin":
  113. admin()
  114.  
  115. else:
  116. print("Invalid Command")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement