I had a question/request come my way to day....

"i need a way to log user activity.... can we do that?"

this was the end result... needs the autoitx.dll

Code:

break on

$logfile = readprofilestring(@scriptdir+"\config.ini","Usage","Logfile")
$ = open(1,$logfile,5)

$autoit = CreateObject("AutoItX.Control")
if @error
shell '%comspec% /c regsvr32 "@scriptdir\AutoItX.dll" -s'
$autoit = CreateObject("AutoItX.Control")
if @error
beep beep beep
Quit
endif
endif

while not @error
$currentwindow = $autoit.WinGetActiveTitle
if $currentwindow <> $lastWindow
$lastwindow = $currentwindow
$ = writeline(1,@userid + " " + @date + " " + @time+" "+$currentWindow+@crlf)
endif
sleep (1)
loop