Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
698 B
1
Indexable
Never
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn   ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.

; Set the number of iterations to run the script
NumIterations := 1000

; Loop through each iteration
Loop % NumIterations
{
    ; Simulate a random keystroke
    Random, key, a, z
    SendInput, %key%

    ; Simulate a random mouse click
    Random, x, 0, A_ScreenWidth
    Random, y, 0, A_ScreenHeight
    Click %x%, %y%

    ; Randomly delay between keystrokes and mouse clicks
    Random, delay, 50, 1000
    Sleep, %delay%
}