import pyautogui
screenWidth, screenHeight = pyautogui.size()
pyautogui.moveTo(screenWidth / 2, screenHeight / 2)
pyautogui.moveTo(screenWidth / 3, screenHeight / 3)
shutdown -a
<?xml version="1.0" encoding="UTF-16" ?>
- <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
- <RegistrationInfo>
<Date>2018-07-09T11:57:08.396045</Date>
<Author>Тостер\ЁжЫГ</Author>
</RegistrationInfo>
- <Triggers>
- <EventTrigger>
<Enabled>true</Enabled>
<Subscription><QueryList><Query Id="0" Path="System"><Select Path="System">*[System[Provider[@Name='USER32'] and EventID=1074]]</Select></Query></QueryList></Subscription>
</EventTrigger>
- <EventTrigger>
<Enabled>true</Enabled>
<Subscription><QueryList><Query Id="0" Path="System"><Select Path="System">*[System[Provider[@Name='USER32'] and EventID=1076]]</Select></Query></QueryList></Subscription>
</EventTrigger>
- <EventTrigger>
<Enabled>true</Enabled>
<Subscription><QueryList><Query Id="0" Path="System"><Select Path="System">*[System[Provider[@Name='USER32'] and (EventID=1074 or EventID=1076)]]</Select></Query></QueryList></Subscription>
</EventTrigger>
</Triggers>
- <Principals>
- <Principal id="Author">
<UserId>f-1\ЁжЫГ</UserId>
<LogonType>InteractiveToken</LogonType>
<RunLevel>LeastPrivilege</RunLevel>
</Principal>
</Principals>
- <Settings>
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
<AllowHardTerminate>true</AllowHardTerminate>
<StartWhenAvailable>false</StartWhenAvailable>
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
- <IdleSettings>
<StopOnIdleEnd>true</StopOnIdleEnd>
<RestartOnIdle>false</RestartOnIdle>
</IdleSettings>
<AllowStartOnDemand>true</AllowStartOnDemand>
<Enabled>true</Enabled>
<Hidden>false</Hidden>
<RunOnlyIfIdle>false</RunOnlyIfIdle>
<WakeToRun>false</WakeToRun>
<ExecutionTimeLimit>P3D</ExecutionTimeLimit>
<Priority>7</Priority>
</Settings>
- <Actions Context="Author">
- <Exec>
<Command>shutdown</Command>
<Arguments>-a</Arguments>
</Exec>
</Actions>
</Task>
#NoTrayIcon
If WinExists("antisleep") Then Exit 1
AutoItWinSetTitle("antisleep")
#include <Timers.au3>
While 1
Sleep(1000)
If _Timer_GetIdleTime() >= 1000 * 60 * 60 Then
MouseMove(MouseGetPos(0)+2, MouseGetPos(1)+2)
MouseMove(MouseGetPos(0)-2, MouseGetPos(1)-2)
EndIf
WEnd