Jump to content

Recommended Posts

Posted (edited)

Hi,

At first, thanks to autoit users who have helped me for do this script

Thanks also to users for their functions

Version 1.5 Availiable !
Update :
*Start menu counter (thanks to SoftVoile)
*New _IsPressed function (thanks to me) 
*New Name (thanks to youknowwho4eva)

Mouse'n Key Counter

Functions :

-Count total keys pressed :

*by keyboard

*by mouse

-Count total process run

-Count total distance by cursor

-Get CPU and MEM usage

-Run on start-up or not

Screenshot :

post-42741-1229704736_thumb.png

Attachments :

What you've done today 1.5 : What_you_ve_done_today.au3

Mouse'n Key 1.0 :

DllCallBack.au3 : DllCallBack.au3

Enjoy !

Note : If anyone have usefull ideas about count something, i will add it !

Edited by FireFox
Posted

Yep...but i dont know how to do some functions but i you know post code

I know count flash disk

Count mostly used folder and sites

how manytimes programs is used

And dont know how to do others, when i will have i will do it :)

Posted (edited)

Cause I wanted too, I made this. I did steal a bunch of it from the Computer Info UDF, but start it, move your mouse, and hit space. Doubt its very accurate but it is neat.

#Include <Misc.au3>

Global Const $cI_VersionInfo        = "00.03.08"
Global Const $cI_aName              = 0, _
             $cI_aDesc              = 4
Global  $wbemFlagReturnImmediately  = 0x10, _;DO NOT CHANGE
$wbemFlagForwardOnly        = 0x20      ;DO NOT CHANGE
Global  $ERR_NO_INFO                = "Array contains no information", _
        $ERR_NOT_OBJ                = "$colItems isnt an object"


Dim $Monitor

_ComputerGetMonitors($Monitor)
If @error Then
    $error = @error
    $extended = @extended
    Switch $extended
        Case 1
            _ErrorMsg($ERR_NO_INFO)
        Case 2
            _ErrorMsg($ERR_NOT_OBJ)
    EndSwitch
EndIf


Func _ComputerGetMonitors(ByRef $aMonitorInfo)
    Local $colItems, $objWMIService, $objItem
    Dim $aMonitorInfo[1][26], $i = 1

    $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2")
    $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_DesktopMonitor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

    If IsObj($colItems) Then
        For $objItem In $colItems
            ReDim $aMonitorInfo[UBound($aMonitorInfo) + 1][26]
            $aMonitorInfo[$i][0]    = $objItem.Name
            $aMonitorInfo[$i][1]    = $objItem.Availability
            $aMonitorInfo[$i][2]    = $objItem.Bandwidth
            $aMonitorInfo[$i][3]    = $objItem.ConfigManagerErrorCode
            $aMonitorInfo[$i][4]    = $objItem.Description
            $aMonitorInfo[$i][5]    = $objItem.ConfigManagerUserConfig
            $aMonitorInfo[$i][6]    = $objItem.CreationClassName
            $aMonitorInfo[$i][7]    = $objItem.DeviceID
            $aMonitorInfo[$i][8]    = $objItem.DisplayType
            $aMonitorInfo[$i][9]    = $objItem.ErrorCleared
            $aMonitorInfo[$i][10]   = $objItem.ErrorDescription
            $aMonitorInfo[$i][11]   = $objItem.IsLocked
            $aMonitorInfo[$i][12]   = $objItem.LastErrorCode
            $aMonitorInfo[$i][13]   = $objItem.MonitorManufacturer
            $aMonitorInfo[$i][14]   = $objItem.MonitorType
            $aMonitorInfo[$i][15]   = $objItem.PixelsPerXLogicalInch
            $aMonitorInfo[$i][16]   = $objItem.PixelsPerYLogicalInch
            $aMonitorInfo[$i][17]   = $objItem.PNPDeviceID
            $aMonitorInfo[$i][18]   = $objItem.PowerManagementCapabilities(0)
            $aMonitorInfo[$i][19]   = $objItem.PowerManagementSupported
            $aMonitorInfo[$i][20]   = $objItem.ScreenHeight
            $aMonitorInfo[$i][21]   = $objItem.ScreenWidth
            $aMonitorInfo[$i][22]   = $objItem.Status
            $aMonitorInfo[$i][23]   = $objItem.StatusInfo
            $aMonitorInfo[$i][24]   = $objItem.SystemCreationClassName
            $aMonitorInfo[$i][25]   = $objItem.SystemName
            $i += 1
            
        Next
        $aMonitorInfo[0][0] = UBound($aMonitorInfo) - 1
        If $aMonitorInfo[0][0] < 1 Then
            SetError(1, 1, 0)
        EndIf
    Else
        SetError(1, 2, 0)
    EndIf
EndFunc
$pixels = 0
While 1
    $mouse = MouseGetPos()
$mouse1 = MouseGetPos()
If $mouse[0] < 0 Then $mousex = $mouse[0] - ($mouse[0] * 2)
If $mouse[1] < 0 Then $mousey = $mouse[1] - ($mouse[1] * 2)
If $mouse1[0] < 0 Then $mouse1x = $mouse1[0] - ($mouse1[0] * 2)
If $mouse1[1] < 0 Then $mouse1y = $mouse1[1] - ($mouse1[1] * 2)
If $mouse[0] > 0 Then $mousex = $mouse[0]
If $mouse[1] > 0 Then $mousey = $mouse[1]
If $mouse1[0] > 0 Then $mouse1x = $mouse1[0]
If $mouse1[1] > 0 Then $mouse1y = $mouse1[1]
    
If $mousex > $mouse1x and $mousey > $mouse1y Then $pixels += $mousex - $mouse1x + $mousey - $mouse1y
If $mousex < $mouse1x and $mousey > $mouse1y Then $pixels += $mouse1x - $mousex + $mousey - $mouse1y
If $mousex > $mouse1x and $mousey < $mouse1y Then $pixels += $mousex - $mouse1x + $mouse1y - $mousey
If $mousex < $mouse1x and $mousey < $mouse1y Then $pixels += $mouse1x - $mousex + $mouse1y - $mousey
    
    $inches = $pixels / $monitor[1][15]
$miles = $inches /63350
    If _IsPressed(20) Then  MsgBox(0,"","Your mouse has traveled " & $miles & " miles" & @lf & "and incase your wondering " & $miles * 1.609344 & " Kilometers")
    If _IsPressed("1b") then ExitLoop
    WEnd

Oh yea, ESC to exit.

Edited by youknowwho4eva

Giggity

Posted (edited)

@youknowwho4eva

Thanks,

I think its for count number of monitors ?

anyway, i will add it :)

Edited by FireFox
Posted

@youknowwho4eva

So if some monitors exists display the one wich have hightest pixelsPerXlogocalInch

I think i will rename my script for Infinite counter if every add something :)

Posted

If I'm understanding you, your talking about if there are multiple monitors? I'm not certain but seeing I put 1 as the first element, it automatically shows for your primary monitor.

Call it the "what you did with your day" monitor. Set some limits in there so say your mouse travels 5 miles have it say "God Man go outside or something" lol

Giggity

Posted (edited)

@youknowwho4eva

:) !! Ive thought for keys pressed after 20000 : Stop now geek or i stop computer :)

Edited by FireFox
Posted

@TehWhale

Omg completly forgotten to add it, i cant to it now can you search it in forum ? or wait until i add it :|

Posted (edited)

@TehWhale

Thanks for trying, you can add other count functions and post it here or just give me ideas and i will do it i soon as i can :)

Edited by FireFox
Posted (edited)

@Everybody

Ive tried to save number of keys pressed if there are new record but there is beug with autoit...if anybody can make it work i will be happy :)

Edited by FireFox
Posted (edited)

What about?

Edit : I understood, i just write wrong its not about keyloger i just want to save number of total keys pressed, edited last reply

Edited by FireFox
Guest
This topic is now closed to further replies.
×
×
  • Create New...