I am looking for a (macro) program for windows (10) that allows me to

  • move the mouse around so the pc doesn't automatically go to sleep.

  • then press the enter-key (or better: a series of keys) at a specific point in time.

I need the program to be extremely simple and reliable, and without scripting and so forth.

Everything I've found online is very complex.

  • 1
    Please provide a little bit for context-info about the "then press the enter-key (or better: a series of keys) at a specific point in time." what defines that point in time?
    – Sonamor
    Jun 5, 2018 at 7:37

1 Answer 1


I know you said no scripting but your best option, I believe is AutoHotKey.

You will need the MoveMouse function


The Send function


The Random Function and SetTimer function

https://autohotkey.com/docs/commands/Random.htm https://autohotkey.com/docs/commands/SetTimer.htm

Really quick your script could look like this (not tested)

#Persistent ; keep the script open after first execution

PressEnter(times) ; function to press enter key
 Loop, %times% ; Loop the number of times variable
   Send {Enter} ; Send enter key
   Sleep, 100 ; Sleep for 100 ms for security

SetTimer, MoveMouse, 600000; Every 10 mins in ms

MoveMouse: ; what to do every 10 mins
Random, x, 1, 1920 ; Get a random number between 1 and 1920 asuming res. is full HD
Random, y, 1, 1080 ; Get a random number between 1 and 1080
Random, EnterKeyTimes, 1, 10 ; Get random number for Enter key presses
MouseMove, x, y ; Move Mouse to these random numbers
PressEnter(EnterKeyTimes) ; Call the function with the EnterKeyTimes variable

This code has not been tested but it probably works or needs a few changes. Give it a go

Of course, if you don't want random numbers but you want certain x,y coordinates and a specific number of Enter key presses, create the variables and assign values to them like this:

x = 1000  ; Set x to 1000 
y = 1000  ; Set y to 1000
EnterKeyTimes = 3 ; Enter key to be pressed 3 times

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.