Jump to content
Sign in to follow this  

_IsPressed wildcard?

Recommended Posts


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)


While 1

If _IsPressed ($Key) Then ;Currently Space




Func _Quit()


EndFunc ;==>_Quit

Func _UserActive()

GUICtrlSetData($Edit1, _NowTime (5))

EndFunc ;==>_UserNotActive

Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.