Code:
;;===================================================================================================
;; Modify your key, variable present at line 15, for keylist see
;; http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm
;; =================================================================================================
HotKeySet('{END}', 'Quit')
HotKeySet('{HOME}', 'Pause')
;;Config time to turn off
;;This is experimental, use at own risk
;;If you want to turn it off set both vars to -1
$Hour = -1
$Min = -1
$key = '1' ;; here you set key you want to press.
$pressdelay = 3000 ;; modify this value to exact time you want script to wait before next click, i.e. 3000 = 3 seconds.
;; position of tooltip
$toolX = 0
$toolY = 0
Global $Paused
;; Run program paused
Pause()
;;===========================================================================
;; Main Sequence
;;===========================================================================
While 1
;;_WinWaitActivate("Diablo III","")
Sleep(100)
CheckTime()
Sleep(100)
PressKey()
Wend
;;Pause the program
Func Pause()
$Paused = Not $Paused
While $Paused
Sleep(1000)
ToolTip('Paused... Press HOME to Start. END to Exit.', $toolX, $toolY)
WEnd
EndFunc
;; Turn off diablo and shutdown pc
Func Quit1()
ProcessClose("Diablo III.exe")
Run("shutdown -s -t 5")
Exit
EndFunc
;; just turn off script
Func Quit()
Exit
EndFunc
;; this func is responsible for turning off PC on time you want.
Func CheckTime()
If @HOUR = $Hour AND @MIN >= $Min Then
Quit1()
EndIf
EndFunc
;; this func sends choosen key
Func PressKey()
While 1
Send($key)
Sleep($pressdelay)
Tooltip('Clicking press HOME to pause, END to exit', $toolx, $tooly)
Wend
EndFunc
Written by non-programmer, based on autoit bots avaliable on this forum. Here you go.