wedding Posted August 12, 2008 Posted August 12, 2008 greetings i am trying to write a script so when i press the key "a" , it will press the key "b" i dont know what to use to check if key "a" is pressed or not while 1 if send("a") then send("b") endif wend if send("a") = true then send("b") endif how do i check if key A is pressed or not? do i need to make a fucntion for this thank you for reading
wedding Posted August 12, 2008 Author Posted August 12, 2008 (edited) Look in help file about _IsPressed function.thank you#Include <Misc.au3>If _IsPressed("a", $dll) Then Send("b")While _IsPressed("a", $dll) Sleep(10)WendEndIfwhat is the $dll mean?cant get it to work says varible hasnt be declared#Include <Misc.au3>While 1If _IsPressed("a") Then Send("b")EndIfwendthis gives me no error when i run it but its not doing what i want it to do when i press "a" Edited August 12, 2008 by wedding
Andreik Posted August 12, 2008 Posted August 12, 2008 DLL is handle to dll(default user32.dll) You can use simple _IsPressed($sHexKey).
finalfx Posted August 12, 2008 Posted August 12, 2008 Thanks for your help guys, hopefully when I get a little more time to invest I'll catch up but for now im playing the game called make it work. Anyways thanks for the answers
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