Browse Source

Add all 3 scripts via upload

Coder 4 years ago
parent
commit
5accc9599a
3 changed files with 22 additions and 0 deletions
  1. 1 0
      src/asus-sign-out.bat
  2. 19 0
      src/asus-sign-out.py
  3. 2 0
      src/asus-sign-out.vbs

+ 1 - 0
src/asus-sign-out.bat

@@ -0,0 +1 @@
+python3 "H:\code\asus-sign-out.py"

+ 19 - 0
src/asus-sign-out.py

@@ -0,0 +1,19 @@
+#Automatic Logout Script
+#Author: PythonCoder8
+
+import tkinter as tk, time, os
+
+time.sleep(10)
+win = tk.Tk()
+win.iconbitmap('D:\icon-warning.ico')
+win.geometry("700x150")
+win.configure(bg="yellow")
+win.title("AUTOMATIC LOGOFF")
+warnLabelOne = tk.Label(win, text ='WARNING: YOU WILL BE LOGGED OUT IN 10 SECONDS',font=("Arial bold", 18),fg="red",bg="yellow")
+warnLabelTwo = tk.Label(win, text='PLEASE SAVE ANY OPENED FILES',font=("Arial bold", 18),fg="red",bg="yellow")
+warnLabelOne.pack()
+warnLabelTwo.pack()
+win.after(5000, lambda: win.destroy())
+win.mainloop()
+time.sleep(5)
+os.system("shutdown -l")

+ 2 - 0
src/asus-sign-out.vbs

@@ -0,0 +1,2 @@
+Set objShell = WScript.CreateObject("WScript.Shell")
+objShell.Run("H:\code\asus-sign-out.bat"), 0, True