HockeyFan Posted October 17, 2006 Share Posted October 17, 2006 Please Help!! (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! Link to comment Share on other sites More sharing options...
Valuater Posted October 17, 2006 Share Posted October 17, 2006 see _IsPressed() in help 8) Link to comment Share on other sites More sharing options...
HockeyFan Posted October 17, 2006 Author Share Posted October 17, 2006 see _IsPressed() in help8) My bad!I looked in the Help file but I missed the underscore! Thanks! Link to comment Share on other sites More sharing options...
HockeyFan Posted October 17, 2006 Author Share Posted October 17, 2006 see _IsPressed() in help 8) OK, now what am I doing wrong!! 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) Link to comment Share on other sites More sharing options...
Valuater Posted October 17, 2006 Share Posted October 17, 2006 per help... there is an include #Include <Misc.au3> _IsPressed($s_hexKey[, $v_dll = 'user32.dll']) 8) Link to comment Share on other sites More sharing options...
HockeyFan Posted October 17, 2006 Author Share Posted October 17, 2006 per help... there is an include #Include <Misc.au3> _IsPressed($s_hexKey[, $v_dll = 'user32.dll']) 8) Yes! I have that at the beginning of my script...I just did not include it in the example I posted...sorry! :"> Any further ideas? Link to comment Share on other sites More sharing options...
Valuater Posted October 17, 2006 Share Posted October 17, 2006 Until <--------------------------------------------------------(the ENTER key is pressed) 2B = EXECUTE key you want 0D = ENTER key 8) Link to comment Share on other sites More sharing options...
HockeyFan Posted October 17, 2006 Author Share Posted October 17, 2006 Until <--------------------------------------------------------(the ENTER key is pressed)2B = EXECUTE keyyou want 0D = ENTER key8)Thank you :"> Works like a charm!! Thanks for your help! Link to comment Share on other sites More sharing options...
Valuater Posted October 17, 2006 Share Posted October 17, 2006 Welcome 8) Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 17, 2006 Share Posted October 17, 2006 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 More sharing options...
Valuater Posted October 17, 2006 Share Posted October 17, 2006 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,Megain other words.. place this "ControlDisable ( " User Information", "OK", 6)"before.."Do"and i agree also8) Link to comment Share on other sites More sharing options...
HockeyFan Posted October 17, 2006 Author Share Posted October 17, 2006 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 More sharing options...
Valuater Posted October 17, 2006 Share Posted October 17, 2006 yes... 8) Link to comment Share on other sites More sharing options...
HockeyFan Posted October 17, 2006 Author Share Posted October 17, 2006 yes...8)Thank you! Link to comment Share on other sites More sharing options...
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