Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import webbrowser
- import os
- import subprocess
- def ofbPlaylist():
- webbrowser.open('https://open.spotify.com/playlist/4pQsOySfS00kLk2a2TtXPq')
- def drillPlaylist():
- webbrowser.open('https://open.spotify.com/playlist/1an2ki1rLlBJUwA8cZgVXs')
- def mixPlaylist():
- webbrowser.open('https://open.spotify.com/playlist/3ovMTJbiyRO33v7d3IY9Y3')
- def youtube():
- webbrowser.open('https://youtube.com')
- def quit():
- screen.quit()
- def discord():
- try:
- subprocess.Popen(r'C:\Users\kuba0\AppData\Local\Discord\app-0.0.305\Discord.exe')
- except Exception as e:
- str(e)
- def python():
- try:
- subprocess.Popen(r'C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.5\bin\pycharm64.exe')
- except Exception as e:
- str(e)
- def minecraft():
- try:
- subprocess.Popen(r'C:\Program Files (x86)\Minecraft Launcher\MinecraftLauncher.exe')
- except Exception as e:
- str(e)
- def minecraftALT():
- try:
- subprocess.Popen(r'C:\Users\kuba0\AppData\Roaming\.minecraft\TLauncher.exe')
- except Exception as e:
- str(e)
- class topName(Frame):
- def __init__(self, parent=None):
- Frame.__init__(self, parent)
- Frame.pack(self)
- Label(self, text = 'Buttons', width=100, fg="red", bg="black").pack()
- frame = Frame(screen, width=10, height=25,bg="#1a1a1a")
- frame.pack()
- Label(text="Websites", width=100, fg="red", bg="black").pack()
- topFrame = Frame(screen)
- topFrame.pack()
- middleFrame = Frame(screen)
- middleFrame.pack()
- Label(text = "Applications", width=100, fg="red", bg="black").pack()
- discordFrame = Frame(screen, bg="#1a1a1a")
- discordFrame.pack()
- bottomFrame = Frame(screen)
- bottomFrame.pack(side=BOTTOM)
- button1 = Button(topFrame, text="OFB Playlist", fg="red", bg="black", command=ofbPlaylist)
- button1.pack(side=LEFT)
- button2 = Button(topFrame, text="Drill Playlist", fg="red", bg="black", command=drillPlaylist)
- button2.pack(side=LEFT)
- button3 = Button(topFrame, text="Mix Playlist", fg="red", bg="black", command=mixPlaylist)
- button3.pack(side=LEFT)
- button5 = Button(bottomFrame, text="Quit", fg="red", bg="black", command=quit)
- button5.pack(side=BOTTOM)
- button4 = Button(middleFrame, text="Youtube", fg="red", bg="black", command=youtube)
- button4.pack(side=BOTTOM)
- button6 = Button(discordFrame, text="Discord", fg="red", bg="black", command=discord)
- button6.pack(side=LEFT)
- button7 = Button(discordFrame, text="Python", fg="red", bg="black", command=python)
- button7.pack(side=RIGHT)
- button8 = Button(discordFrame, text="Minecraft", fg="red", bg="black", command=minecraft)
- button8.pack(side=RIGHT)
- button9 = Button(discordFrame, text="Minecraft ALT", fg="red", bg="black", command=minecraftALT)
- button9.pack(side=RIGHT)
- if __name__ == '__main__':
- screen = Tk()
- screen.title("Access Buttons")
- screen.configure(bg="#1a1a1a")
- screen.geometry("500x400")
- app = topName(screen)
- screen.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement