diff --git a/check.py b/check.py new file mode 100644 index 0000000..960ae5c --- /dev/null +++ b/check.py @@ -0,0 +1,33 @@ +from tkinter import * +import subprocess +from time import sleep +import time + +root = Tk() +root.geometry('400x250') + +display = Label(root, text='Are you there?', font=('', 20)) +display.pack(pady=40) + + +def locking(): + cmd = 'rundll32.exe user32.dll, LockWorkStation' + subprocess.call(cmd) + + but['state'] = 'disable' + + +def cancel(): + + root.after_cancel(L) + display['text'] = 'You can close this windows now' + + +# Take a reference of after +L = root.after(60000, locking) + +but = Button(root, text='Im here', command=cancel) +but.pack(side='bottom', pady=30) + + +mainloop() diff --git a/run.vbs b/run.vbs new file mode 100644 index 0000000..bd5afb5 --- /dev/null +++ b/run.vbs @@ -0,0 +1,5 @@ +Set objShell = Wscript.CreateObject ("Wscript.shell") +do +WScript.Sleep(600000) +objShell.Run "python C:\users\%username%\usercheck\check.py" +loop \ No newline at end of file