venezia Posted August 17, 2005 Share Posted August 17, 2005 Hi all, This is my first message here. I'd like to create a script like this: -The script wait for me to press SPACE -The script wait for 12 seconds (for example) -The script press SPACE hisself. Is it possible to create such a script and if yes, which functions do I need to use ? Regards, Link to comment Share on other sites More sharing options...
rmorrow Posted August 17, 2005 Share Posted August 17, 2005 I haven't tested this, but it will probably work: HotKeySet(" ", "SendSpace") Sleep(12000) SendSpace() Func SendSpace() Send(" ") Exit EndFunc I think there's an _IsPressed UDF also that might work better in a For loop. Link to comment Share on other sites More sharing options...
venezia Posted August 17, 2005 Author Share Posted August 17, 2005 Thanks but it doesn't seem to work cause i get an error message Link to comment Share on other sites More sharing options...
Knight Posted August 17, 2005 Share Posted August 17, 2005 If you want the keypress delayed 12 seconds then use this. HotKeySet("{SPACE}", "GoSpaceBar") While 1 Sleep(50) WEnd Func GoSpaceBar() Sleep(12000) HotKeySet("{SPACE}") Send(" ") HotKeySet("{SPACE}", "GoSpaceBar") EndFunc If you want it to send a space when you press space, and another space after 12 seconds, then use this. HotKeySet("{SPACE}", "GoSpaceBar") While 1 Sleep(50) WEnd Func GoSpaceBar() HotKeySet("{SPACE}") Send(" ") Sleep(12000) Send(" ") HotKeySet("{SPACE}", "GoSpaceBar") EndFunc Link to comment Share on other sites More sharing options...
seandisanti Posted August 17, 2005 Share Posted August 17, 2005 Thanks but it doesn't seem to work cause i get an error message <{POST_SNAPBACK}>what error message? Link to comment Share on other sites More sharing options...
venezia Posted August 17, 2005 Author Share Posted August 17, 2005 If you want the keypress delayed 12 seconds then use this.If you want it to send a space when you press space, and another space after 12 seconds, then use this.<{POST_SNAPBACK}>Thank you very much it works perfectly Link to comment Share on other sites More sharing options...
venezia Posted August 17, 2005 Author Share Posted August 17, 2005 what error message?<{POST_SNAPBACK}>I got this message: Link to comment Share on other sites More sharing options...
seandisanti Posted August 17, 2005 Share Posted August 17, 2005 I got this message:<{POST_SNAPBACK}>you were not removing your hotkey binding prior to sending the hotkey... so each send was calling the function to send another, but your function was never ending. So your function was just instanciating itself over and over until it died... Link to comment Share on other sites More sharing options...
Scriptkiddi3 Posted August 18, 2005 Share Posted August 18, 2005 If you want the keypress delayed 12 seconds then use this.Do you know a script to delay all characters? [-"Scriptkiddie, nice to meet you!"-] Link to comment Share on other sites More sharing options...
rmorrow Posted August 18, 2005 Share Posted August 18, 2005 Delay all characters? You mean like... ... HotKeySet(" ") BlockInput(1) Sleep(12000) Send(" ") BlockInput(0) HotKeySet(" ", "GoSpaceBar") ... This will block all mouse and keyboard input and make it seem like Windows has locked up for 12 seconds, then send a space. If you mean you want to capture all keyboard input and delay it on a per keystroke basis, you'd have to HotKeySet all the keys on the keyboard and I'm pretty sure they have limited the number of hotkeys to disallow this functionality as it lead to people creating keyloggers. I think AutoHotKey will do it though. 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