Click not being sent through (sometimes)

Ask gaming related questions
waffles11
Posts: 1
Joined: 09 Dec 2017, 15:35

Click not being sent through (sometimes)

Post by waffles11 » 09 Dec 2017, 15:43

Hello, I have done some google searches but haven't found a good answer so figured I'd ask here.

Basically I have a script that will click 3 buttons for me in a game called Final Fantasy XIV. Sometimes the script works flawlessly and its all good but sometimes the mouse moves to the pixel and clicks but the game doesn't appear to interpret this as it doesn't start the macro it is supposed to. I can't figure out why sometimes the click doesn't work though. Below is my script, it first clicks in the game to tab in after opening the script then it clicks the 3 buttons it should with appropriate wait times in between. Any assistance would be great, thanks!

Code: Select all

#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.

#SingleInstance force
CoordMode, Mouse, Screen ; Use absolute screen coordinates

random, ranx4 , 890, 958
random, rany4 , 698, 708
click, %ranx4%, %rany4% ;(Start the synthesis)

Random, sleep5, 1800, 2500
Sleep, %sleep5% ;(wait 1.8 - 2.5 seconds) 

Loop 20 {

random, ranx1 , 890, 958
random, rany1 , 698, 708
click, %ranx1%, %rany1% ;(Start the synthesis)

Random, sleep1, 2700, 3000
Sleep, %sleep1% ;(wait 2.7 - 3 seconds) 

random, ranx2 , 899, 918
random, rany2 , 870, 885
click, %ranx2%, %rany2% ;(Start macro 1)

Random, sleep2, 39000, 40000
Sleep, %sleep2% ;(wait 39 - 40 seconds for macro 1) 

random, ranx3 , 940, 960
random, rany3 , 870, 885
click, %ranx3% %rany3% ;(Start macro 2)

Random, sleep3, 31900, 32500
Sleep, %sleep3% ;(wait 31.9 - 32.5 seconds for macro 2) 
}

Esc::ExitApp
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: Click not being sent through (sometimes)

Post by TygerByte » 11 Dec 2017, 07:22

I shall refer you to this nice thread https://autohotkey.com/boards/viewtopic.php?f=7&t=11084

Basically AHK can be too fast at times. You may have to slow it down.
Post Reply

Return to “Gaming”