| @@ 642-654 (lines=13) @@ | ||
| 639 | mins.place(x=340, y=220, width=50) |
|
| 640 | ||
| 641 | sleep = IntVar() |
|
| 642 | def shut_timer(): |
|
| 643 | sh_time = sleep.get() |
|
| 644 | if sh_time == 0: |
|
| 645 | try: |
|
| 646 | pywhatkit.cancelShutdown() |
|
| 647 | messagebox.showinfo("Shutdown Timer", "Shutdown timer is not fixed") |
|
| 648 | except NameError: |
|
| 649 | messagebox.showinfo("Shutdown Timer", "Shutdown timer is not fixed") |
|
| 650 | elif sh_time <= 86400: |
|
| 651 | messagebox.showinfo("Shutdown Timer", "When we sent WhatsApp message PC will shutdown after fixed timer") |
|
| 652 | pywhatkit.shutdown(time=sh_time) |
|
| 653 | else: |
|
| 654 | messagebox.showinfo("Shutdown Timer", "Shutdown timer is Greater than 24hrs.") |
|
| 655 | ||
| 656 | def go(): |
|
| 657 | messagebox.showinfo("AutoWhatsappMessage", |
|
| @@ 72-84 (lines=13) @@ | ||
| 69 | mins.place(x=340, y=220, width=50) |
|
| 70 | ||
| 71 | sleep = IntVar() |
|
| 72 | def shut_timer(): |
|
| 73 | sh_time = sleep.get() |
|
| 74 | if sh_time == 0: |
|
| 75 | try: |
|
| 76 | pywhatkit.cancelShutdown() |
|
| 77 | messagebox.showinfo("Shutdown Timer", "Shutdown timer is not fixed") |
|
| 78 | except NameError: |
|
| 79 | messagebox.showinfo("Shutdown Timer", "Shutdown timer is not fixed") |
|
| 80 | elif sh_time <= 86400: |
|
| 81 | messagebox.showinfo("Shutdown Timer", "When we sent WhatsApp message PC will shutdown after fixed timer") |
|
| 82 | pywhatkit.shutdown(time=sh_time) |
|
| 83 | else: |
|
| 84 | messagebox.showinfo("Shutdown Timer", "Shutdown timer is Greater than 24hrs.") |
|
| 85 | ||
| 86 | def go(): |
|
| 87 | messagebox.showinfo("AutoWhatsappMessage", |
|