I want to keep timp stamp record when someone sends left click on paricular mouse position. For this purpose, I use below mentined script but it keeps time records for all the left clicks. For exmple I want to keep time record when someone sends left click on "x > 481 and x < 728 and y > 546 and y < 595" but it is keeping time record when someone clicks out of this position also. It would be great if someone can help me on this. I need time stamp just for left clicks on particular mouse position. Thanks in advance.
Code: Select all
#IfWinActive, ABCXYZ
~LButton::
MouseGetPos, x,y
if (x > 481 and x < 728 and y > 546 and y < 595)
IniRead,keyCount,keylogger.ini,KeyCounts, % a_username
IniWrite, % (!keyCount) ? 1 : keyCount+1, keylogger.ini, KeyCounts, % a_username
FileAppend, % A_Username " = " A_Now "`n", keylogger.ini
Return
^!#o::
IniRead,var,keylogger.ini,KeyCounts
MsgBox % var
Return