Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. from tkinter import *
  2. import webbrowser
  3. import os
  4. import subprocess
  5.  
  6. def ofbPlaylist():
  7. webbrowser.open('https://open.spotify.com/playlist/4pQsOySfS00kLk2a2TtXPq')
  8.  
  9. def drillPlaylist():
  10. webbrowser.open('https://open.spotify.com/playlist/1an2ki1rLlBJUwA8cZgVXs')
  11.  
  12. def mixPlaylist():
  13. webbrowser.open('https://open.spotify.com/playlist/3ovMTJbiyRO33v7d3IY9Y3')
  14.  
  15. def youtube():
  16. webbrowser.open('https://youtube.com')
  17.  
  18. def quit():
  19. screen.quit()
  20.  
  21. def discord():
  22. try:
  23. subprocess.Popen(r'C:\Users\kuba0\AppData\Local\Discord\app-0.0.305\Discord.exe')
  24. except Exception as e:
  25. str(e)
  26.  
  27. def python():
  28. try:
  29. subprocess.Popen(r'C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.5\bin\pycharm64.exe')
  30. except Exception as e:
  31. str(e)
  32.  
  33. def minecraft():
  34. try:
  35. subprocess.Popen(r'C:\Program Files (x86)\Minecraft Launcher\MinecraftLauncher.exe')
  36. except Exception as e:
  37. str(e)
  38.  
  39. def minecraftALT():
  40. try:
  41. subprocess.Popen(r'C:\Users\kuba0\AppData\Roaming\.minecraft\TLauncher.exe')
  42. except Exception as e:
  43. str(e)
  44.  
  45. class topName(Frame):
  46. def __init__(self, parent=None):
  47. Frame.__init__(self, parent)
  48. Frame.pack(self)
  49. Label(self, text = 'Buttons', width=100, fg="red", bg="black").pack()
  50. frame = Frame(screen, width=10, height=25,bg="#1a1a1a")
  51. frame.pack()
  52. Label(text="Websites", width=100, fg="red", bg="black").pack()
  53. topFrame = Frame(screen)
  54. topFrame.pack()
  55. middleFrame = Frame(screen)
  56. middleFrame.pack()
  57. Label(text = "Applications", width=100, fg="red", bg="black").pack()
  58. discordFrame = Frame(screen, bg="#1a1a1a")
  59. discordFrame.pack()
  60. bottomFrame = Frame(screen)
  61. bottomFrame.pack(side=BOTTOM)
  62.  
  63. button1 = Button(topFrame, text="OFB Playlist", fg="red", bg="black", command=ofbPlaylist)
  64. button1.pack(side=LEFT)
  65. button2 = Button(topFrame, text="Drill Playlist", fg="red", bg="black", command=drillPlaylist)
  66. button2.pack(side=LEFT)
  67. button3 = Button(topFrame, text="Mix Playlist", fg="red", bg="black", command=mixPlaylist)
  68. button3.pack(side=LEFT)
  69. button5 = Button(bottomFrame, text="Quit", fg="red", bg="black", command=quit)
  70. button5.pack(side=BOTTOM)
  71. button4 = Button(middleFrame, text="Youtube", fg="red", bg="black", command=youtube)
  72. button4.pack(side=BOTTOM)
  73. button6 = Button(discordFrame, text="Discord", fg="red", bg="black", command=discord)
  74. button6.pack(side=LEFT)
  75. button7 = Button(discordFrame, text="Python", fg="red", bg="black", command=python)
  76. button7.pack(side=RIGHT)
  77. button8 = Button(discordFrame, text="Minecraft", fg="red", bg="black", command=minecraft)
  78. button8.pack(side=RIGHT)
  79. button9 = Button(discordFrame, text="Minecraft ALT", fg="red", bg="black", command=minecraftALT)
  80. button9.pack(side=RIGHT)
  81.  
  82. if __name__ == '__main__':
  83. screen = Tk()
  84. screen.title("Access Buttons")
  85. screen.configure(bg="#1a1a1a")
  86. screen.geometry("500x400")
  87. app = topName(screen)
  88. screen.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement