DrLouie Posted November 3, 2007 Share Posted November 3, 2007 Well i made a simple script to convert my F key in DOWN - RIGHT - E but the problem is that it keeps looping i mean if i hold F it keeps doing it and is there any way i can make it so it doesnt loop so i just have to press it every time it does down - right -e? its for a simple fighting game Func f() send("{DOWN}") sleep(19) Send("{LEFT}") sleep(19) Send("e") EndFunc Link to comment Share on other sites More sharing options...
Bowmore Posted November 3, 2007 Share Posted November 3, 2007 (edited) Well i made a simple script to convert my F key in DOWN - RIGHT - E but the problem is that it keeps looping i mean if i hold F it keeps doing it and is there any way i can make it so it doesnt loop so i just have to press it every time it does down - right -e? its for a simple fighting game Func f() send("{DOWN}") sleep(19) Send("{LEFT}") sleep(19) Send("e") EndFunc Have a look at _IsPressed in the help file Either of these to methods should achieve what you require. Method 1 expandcollapse popup#Include <Misc.u3> HotKeySet("f","f") While 1 Sleep(100) WEnd Func f() HotKeySet("f") send("{DOWN}") sleep(19) Send("{LEFT}") sleep(19) Send("e") While _IsPressed("46") Sleep(100) WEnd HotKeySet("f","f") EndFuncoÝ÷ ØÇvjëh×6#Include <Misc.u3> HotKeySet("f","f") While 1 Sleep(100) WEnd Func f() BlockInput(1) send("{DOWN}") sleep(19) Send("{LEFT}") sleep(19) Send("e") While _IsPressed("46") Sleep(100) WEnd BlockInput(0) EndFunc Bowmore Edited November 3, 2007 by Bowmore "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
DrLouie Posted November 5, 2007 Author Share Posted November 5, 2007 Have a look at _IsPressed in the help file Either of these to methods should achieve what you require. Method 1 expandcollapse popup#Include <Misc.u3> HotKeySet("f","f") While 1 Sleep(100) WEnd Func f() HotKeySet("f") send("{DOWN}") sleep(19) Send("{LEFT}") sleep(19) Send("e") While _IsPressed("46") Sleep(100) WEnd HotKeySet("f","f") EndFuncoÝ÷ ØÇvjëh×6#Include <Misc.u3> HotKeySet("f","f") While 1 Sleep(100) WEnd Func f() BlockInput(1) send("{DOWN}") sleep(19) Send("{LEFT}") sleep(19) Send("e") While _IsPressed("46") Sleep(100) WEnd BlockInput(0) EndFunc So what am i doing wrong? Link to comment Share on other sites More sharing options...
ofLight Posted November 5, 2007 Share Posted November 5, 2007 add "#Include <Misc.Au3>" to the top of ur script There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 5, 2007 Share Posted November 5, 2007 BlockInput(1) send("{DOWN}") sleep(19) Send("{LEFT}") sleep(19) Send("e") While _IsPressed("46") Sleep(100) WEnd BlockInput(0) I would like to point out that _IsPressed with always return false in this state, because the user cannot "press" a key when they are blocked. Link to comment Share on other sites More sharing options...
Sveet Posted November 9, 2007 Share Posted November 9, 2007 why not just change it to activate when you press the button down. wouldnt this cause it to only activate once per press? 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