Problem in time stamp Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hitesh
Posts: 34
Joined: 30 May 2017, 09:24

Problem in time stamp

20 Sep 2017, 00:58

Hello All,

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
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Problem in time stamp  Topic is solved

20 Sep 2017, 01:27

Code: Select all

#IfWinActive, ABCXYZ

~LButton::

MouseGetPos, x,y
if (x > 481) && (x < 728) && (y > 546) && (y < 595) {
    ...
   }	
Return


^!#o::
	IniRead,var,keylogger.ini,KeyCounts
	MsgBox % var
	Return
:?:
hitesh
Posts: 34
Joined: 30 May 2017, 09:24

Re: Problem in time stamp

20 Sep 2017, 02:13

BoBo wrote:

Code: Select all

#IfWinActive, ABCXYZ

~LButton::

MouseGetPos, x,y
if (x > 481) && (x < 728) && (y > 546) && (y < 595) {
    ...
   }	
Return


^!#o::
	IniRead,var,keylogger.ini,KeyCounts
	MsgBox % var
	Return
:?:
This code is working fine. Thank you ☺

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Billykid, dinodragon, mcd and 146 guests