You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1012 B
35 lines
1012 B
import tkinter.messagebox as message
|
|
import subprocess
|
|
import datetime
|
|
import os
|
|
import webbrowser
|
|
from dateutil.parser import parse
|
|
# import ctypes
|
|
import tkinter as tk
|
|
import time
|
|
root = tk.Tk()
|
|
root.overrideredirect(1)
|
|
root.withdraw()
|
|
urL='https://drive.google.com'
|
|
firefox_path="C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"
|
|
webbrowser.register('firefox', None,webbrowser.BackgroundBrowser(firefox_path))
|
|
|
|
## Styles:
|
|
## 0 : OK
|
|
## 1 : OK | Cancel
|
|
## 2 : Abort | Retry | Ignore
|
|
## 3 : Yes | No | Cancel
|
|
## 4 : Yes | No
|
|
## 5 : Retry | No
|
|
## 6 : Cancel | Try Again | Continue
|
|
|
|
t = parse(input("Enter endtime: "))
|
|
wait = (t-datetime.datetime.today()).seconds
|
|
subprocess.call(['timeout.exe','/nobreak',str(wait)])
|
|
subprocess.call(['done.bat'])
|
|
subprocess.call(['explorer.exe',os.path.dirname(os.getcwd())])
|
|
webbrowser.get('firefox').open_new_tab(urL)
|
|
time.sleep(.5)
|
|
res = message.askokcancel('Alert!','Upload file and press ok to log off')
|
|
if res:
|
|
subprocess.call(['shutdown.exe','/f','/l'])
|