Link to home
Start Free TrialLog in
Avatar of sweekes283
sweekes283Flag for United States of America

asked on

I need the file: p_getlastinput.dll

Not really a question, but I need either the "p_GetLastInput.dll" or some other DLL that can do the same.  And I need it as soon as possilbe.  The attached code (and today's date) should make it obvious why.


Dim tm, sys, objShell

Set tm = CreateObject("p_GetLastInput.clsIdle")
Set sys = CreateObject("JSSys3.ops")
Set objShell = CreateObject("WScript.Shell")
Do 
    WScript.sleep 1000
    If tm.idletime > 2000 Then
        If sys.GetActiveWindowTitle() <> "" Then
            objShell.Run "rundll32.exe user32.dll,LockWorkStation", 1, False
        End If
    End If

Loop

Open in new window

Avatar of exx1976
exx1976
Flag of United States of America image

After much googling, I was unable to find that dll.  However, this might help you out...


http://www.scriptinganswers.com/forum2/forum_posts.asp?TID=1127
Avatar of sweekes283

ASKER

Yeah, I've seen that one.  It's only good for Remote Connections though.  The DLL I'm after just hooks into the Keyboard and Mouse and reports the last time that either was used.  There aren't any Windows objects that will work for this, so I'm really hoping to come across the same or a similar DLL that someone has assembled.
Avatar of Darren Collins
Hi sweekes283,

If you want run something after the computer has been idle for a set period of time, you can use the task scheduler using the on idle option.  The downside of this is that the smallest unit is one minute.  It can be automated though using schtasks.exe

Regards
Daz.
ASKER CERTIFIED SOLUTION
Avatar of sweekes283
sweekes283
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial