TECHCOMMUNITY.MICROSOFT.COM
import pyautogui, sysimport time, randomimport osclass WindowsInhibitor: ES_CONTINUOUS = 0x80000000 ES_SYSTEM_REQUIRED = 0x00000001 def __init__(self): pass def inhibit(self): import ctypes print("Preventing Windows from going to sleep") ctypes.windll.kernel32.SetThreadExecutionState( WindowsInhibitor.ES_CONTINUOUS | \ WindowsInhibitor.ES_SYSTEM_REQUIRED) def uninhibit(self): import ctypes print("Allowing Windows to go to sleep") ctypes.windll.kernel32.SetThreadExecutionState( WindowsInhibitor.ES_CONTINUOUS)print('Determine how many seconds to wait before moving the cursor')v = input()print('Press Ctrl-C to quit.')try: if os.name == 'nt': osSleep = WindowsInhibitor() osSleep.inhibit() while True: x, y = pyautogui.position() time.sleep(int(v)) a = random.randint(0, 1919) # assuming 1920px width b = random.randint(0, 1079) # assuming 1080px height pyautogui.moveTo(a, b, 4) # 2 is the time in seconds the cursor moves from x,y to a,bexcept KeyboardInterrupt: if osSleep: osSleep.uninhibit() print('\n') ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- getroman com reviews
- acurafinancialservices.com account management
- acurafinancialservices.com account ma
- getroman.com tv
- http cashier.95516.com bing
- http cashier.95516.com bingprivacy notice.pdf
- connected mcgraw hill com lausd
- education.com games play
- rushmorelm.com one time payment
- autotrader.com used cars
- b com 2nd year syllabus
- gmail.com sign in