John117 Posted August 2, 2007 Posted August 2, 2007 Can anyone make this work with a wildcard? (the hole point being to detect any key presses) -I don't even need to know which key! #include <GUIConstants.au3> #Include <Date.au3> #include <Misc.au3> Opt("GuiOnEventMode", 1) $key = "20" ;Currently Space Global $hParent, $Edit1 $hParent = GUICreate("Time Mouse Movement", 716, 561, 155, 134) GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit", $hParent) $Edit1 = GUICtrlCreateEdit("Increase count when mouse not active for X time", 10, 30, 230, 60, $ES_WANTRETURN) GUISetState(@SW_SHOW) While 1 If _IsPressed ($Key) Then ;Currently Space _UserActive() EndIf WEnd Func _Quit() Exit EndFunc ;==>_Quit Func _UserActive() GUICtrlSetData($Edit1, _NowTime (5)) EndFunc ;==>_UserNotActive
ResNullius Posted August 2, 2007 Posted August 2, 2007 Looks like what you're trying to do is detect when the user is not using/not using the computer...?Have you seen this http://www.autoitscript.com/forum/index.ph...st&p=239504 ?But if you still want to tackle it your way, maybe this from the same thread: http://www.autoitscript.com/forum/index.ph...st&p=239634
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now