From 9524bf80b7d708a55b5113587da39701cf2726a6 Mon Sep 17 00:00:00 2001 From: Mr-cool08 <82951310+Mr-cool08@users.noreply.github.com> Date: Sat, 30 Jul 2022 17:36:41 +0200 Subject: [PATCH] Add files via upload --- check.py | 33 +++++++++++++++++++++++++++++++++ run.vbs | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 check.py create mode 100644 run.vbs 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