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

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