0
votes

I want the hotkey to activate when I click X. Then it should:

  • Click LMB
  • Pause 5 ticks
  • Click RMB

And then finished. But for some reason it's not working for me. I've already tried it and looked at other threads. If anyone could help it would be fantastic.

1

1 Answers

0
votes

What do you mean by 5 ticks? If you want to set a timeout for 5 ms or seconds, you should use the Sleep parameter as follows:

Sleep 5 ; milliseconds
Sleep 5000 ; 5 seconds (5000 ms)
Sleep % var ; if you need to use a variable instead of number


There is also a variable called A_TickCount

tick := A_TickCount
while(tick + 5 < A_TickCount) ; 5 ticks
    continue
; I guess this code will execute in 0.1 ms, so try to turn the tick up


In your case:

click
sleep 5000 ; change this if necessary
click right


It works fine for me.
Learn more about Click: https://autohotkey.com/docs/commands/Click.htm