Splitz Posted July 27, 2006 Share Posted July 27, 2006 i want to make a script to disable the enter button. and probally a few other keys. winwaitactive("notepad.exe") sleep(500) i type here and before i begin a new line by pressing enter i need to know the command that will disable the enter key AND trigger other things to happen such as send("hello!!") i been looking through the help file didint really see anything that would let me do this like stopkey("{enter}") or disablekey("{enter}") ect also for when the enter key is pressed i want it to do something like (if) enter is pressed (then) send("hello!!") somethin like that Link to comment Share on other sites More sharing options...
Helge Posted July 27, 2006 Share Posted July 27, 2006 HotKeySet("{enter}", "myfunc") While 1 Sleep(50) WEnd Func myfunc() Send("hello{!}{!}") EndFunc Link to comment Share on other sites More sharing options...
brodie28 Posted July 27, 2006 Share Posted July 27, 2006 (edited) HotKeySet ( "{ENTER}", "pressed") Func pressed() ;Your code here... I assume if you leave this blank then the key will not do anything i.e. disabled EndFunc Should work. Edit: someone beat me to it, and I forgot the while loop. Edited July 27, 2006 by brodie28 Link to comment Share on other sites More sharing options...
Xenobiologist Posted July 27, 2006 Share Posted July 27, 2006 HI, if you want to do something by keypress look as mentioned above at HotKeySet. Another possibility is _isPressed() func. For disabling a key just call a func by hotkey and do nothing in it. 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...
Rex Posted July 27, 2006 Share Posted July 27, 2006 (edited) i want to make a script to disable the enter button. and probally a few other keys. winwaitactive("notepad.exe") sleep(500) i type here and before i begin a new line by pressing enter i need to know the command that will disable the enter key AND trigger other things to happen such as send("hello!!") i been looking through the help file didint really see anything that would let me do this like stopkey("{enter}") or disablekey("{enter}") ect also for when the enter key is pressed i want it to do something like (if) enter is pressed (then) send("hello!!") somethin like that A fast and dirty one HotkeySet("{ENTER}"), "TrapEnter"); Read Help file, for in that there is more info winwaitactive("notepad.exe") sleep(500) ;What ever you want to Type :) Func TrapEnter() Send("Hello") EndFunc Dam... im to slow, in the time i was to write my answ. 3 answ. already came , hmm need to speed up my typing Edited July 27, 2006 by Rex 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