I'm new to VBS. I am trying to get the timestamp of the last activity on the keyboard or mouse. This script will run on loop in backend and store the timestamps in a log.
I discovered these documentations but have no idea how to use them in my code:
My code will be something like:
Dim keyTS, mouseTS, nowTS
while(1)
keyTS = 'some code to get the timestamp of last key pressed'
mouseTS = 'some code to get the timestamp of the last time mouse was clicked'
nowTS = Now 'stores the current timestamp at every loop
' store keyTS, mouseTS and nowTS in a log file
wscript.sleep 60000 ' 1 min gap
wend