Two timers at the same time

Get help with using AutoHotkey and its commands and hotkeys

Two timers at the same time

23 Sep 2017, 16:05

Hi guys,

I'd like to have two timers that both do an action after two different time stamps.

#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.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

Counter = 0.0
SetTimer, PressTheKey, 10000
SetTimer, FarmOnA, 300

Counter += 1.0
MouseClick, left, 1341, 867
if counter = 30.0
Send, {a}

Send, {F5}


F5 should be clicked every 10 seconds
Meanwhile the mouse has to be clicked every 200miliseconds
Every mouseclick should be counted and after 30 clicks the 'A' keyboard action should be pressed.

My script clicks every 200miliseconds but also presses f5 every 200 milisecond

Return to “Ask For Help”

Who is online

Users browsing this forum: ahkfan and 39 guests