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.
|
|
import tkinter.messagebox as messageimport subprocessimport datetimeimport osimport webbrowserfrom dateutil.parser import parse# import ctypesimport tkinter as tkimport timeroot = 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()).secondssubprocess.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'])
|