1 | import tkinter |
||
2 | from tkinter import * |
||
3 | from tkinter import messagebox |
||
4 | import os |
||
5 | import pywhatkit |
||
6 | import Main |
||
7 | #Main.top.withdraw() |
||
8 | window = Tk() |
||
9 | window.overrideredirect(True) |
||
10 | window.geometry("150x400+908+130") |
||
11 | |||
12 | title_bar = Frame(window, bg='#4682b4', relief='ridge', bd=1, highlightcolor='#4682b4',highlightthickness=0) |
||
13 | title_name = Label(title_bar, text="FYIT ADDON", bg='#4682b4', fg="white") |
||
14 | #window.iconbitmap('Assets/YoutubeDownloader.ico') |
||
15 | |||
16 | def WhatsApp(): |
||
17 | try: |
||
18 | Main.top.destroy() |
||
19 | |||
20 | import AutoWhatsApp |
||
21 | |||
22 | except pywhatkit.InternetException: |
||
23 | messagebox.showerror("No Internet", "Please Check the Internet Connection.") |
||
24 | |||
25 | def YSearchcall(): |
||
26 | try: |
||
27 | Main.top.destroy() |
||
28 | AutoWhatsApp.win.destroy() |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
![]() |
|||
29 | import youtubesearch |
||
30 | except pywhatkit.InternetException: |
||
31 | messagebox.showerror("No Internet","Please Check the Internet Connection.") |
||
32 | |||
33 | def closer(): |
||
34 | |||
35 | window.destroy() |
||
36 | window.protocol("WM_DELETE_WINDOW") |
||
37 | |||
38 | def call_main(): |
||
39 | |||
40 | import Main |
||
41 | window.update() |
||
42 | |||
43 | def cancel_shutdown(): |
||
44 | |||
45 | try: |
||
46 | pywhatkit.cancelShutdown() |
||
47 | messagebox.showinfo("Shutdown Cancelled.", "Shutdown Scheduled time cancelled Successfully.") |
||
48 | except NameError: |
||
49 | messagebox.showwarning("No Schedule.", "Shutdown is not been Scheduled.") |
||
50 | |||
51 | def show_hist(): |
||
52 | |||
53 | import WA_history |
||
54 | |||
55 | MainScreen_call = Button(window, text="Video Downloader", |
||
56 | cursor='hand2', command=call_main) |
||
57 | AppButton = Button(window, text="WhatsApp", cursor='hand2', command=WhatsApp) |
||
58 | AppButton1 = Button(window, text="FastYoutubeSearch", |
||
59 | cursor='hand2', command=YSearchcall) |
||
60 | closeButton = Button(window, text="Close", cursor='hand2', command=closer) |
||
61 | clr_shutdown = Button(window, text="Cancel Shutdown", |
||
62 | cursor='hand2', command=cancel_shutdown) |
||
63 | wb_hist = Button(window, text="View WhatsApp History", |
||
64 | cursor='hand2', command=show_hist) |
||
65 | |||
66 | title_bar.pack(fill=X) |
||
67 | title_name.pack(side=LEFT) |
||
68 | |||
69 | AppButton.place(x=10,y=100) |
||
70 | AppButton1.place(x=10,y=150) |
||
71 | MainScreen_call.place(x=10,y=200) |
||
72 | wb_hist.place(x=10, y=250) |
||
73 | clr_shutdown.place(x=10, y=300) |
||
74 | closeButton.place(x=10,y=350) |
||
75 | |||
76 | window.config(bg="green") |
||
77 | window.update() |
||
78 | window.mainloop() |
||
79 |