Jump to content

Novice Help...Test for key press


Recommended Posts

Please Help!! :ph34r: (Novice)

How do I write a script that will loop unil the {ENTER} key is pressed?

Do

ControlDisable ( " User Information", "OK", 6)

Until <--------------------------------------------------------(the ENTER key is pressed)

ControlEnable ( " User Information", "OK", 6)

Thanks in advance! :lmao:

Link to comment
Share on other sites

see _IsPressed() in help

8)

OK, now what am I doing wrong!! :ph34r:

I've used the example in the Help file but when I press the enter key, nothing happens.

Here's my script so far...:

$dll = DllOpen("C:\WINDOWS\system32\user32.dll")

Do
     ControlDisable ( " User Information", "OK", 6)
Until _IsPressed("2B", $dll)
ControlEnable ( " User Information", "OK", 6)
DllClose($dll)

:lmao:

Link to comment
Share on other sites

Hi,

I think it would be better to disable the Control only one time and then do busy waiting for _isPressed Enter and If it is pressed then enable the Control.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Hi,

I think it would be better to disable the Control only one time and then do busy waiting for _isPressed Enter and If it is pressed then enable the Control.

So long,

Mega

in other words.. place this

"ControlDisable ( " User Information", "OK", 6)"

before..

"Do"

and i agree also

8)

NEWHeader1.png

Link to comment
Share on other sites

in other words.. place this

"ControlDisable ( " User Information", "OK", 6)"

before..

"Do"

and i agree also

8)

OK...do you mean:

$dll = DllOpen("C:\WINDOWS\system32\user32.dll")
ControlDisable ( " User Information", "OK", 6)
Do
    Sleep(100)
Until _IsPressed("0D", $dll)
$UserName = GUICtrlRead($UserInputBox)
ControlEnable ( " User Information", "OK", 6)
DllClose($dll)

??

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

  • Recently Browsing   0 members

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