Jump to content

Mouse'n Key Counter <d3montools>


FireFox
 Share

Recommended Posts

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
Link to comment
Share on other sites

Count: opening of FireFox/IE

Count: clicks on start button

Count: the folder opened mostly

Count: mostly used program

Count: Mostly visited site

do you need more ideas?

:)

&

Count: how many times FlashDrive was inserted.

Count: how many times net was connected.

etc

:)

Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them.
Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...