Jump to content

Recommended Posts

Posted

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

Posted (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)

Wend

EndIf

what is the $dll mean?

cant get it to work says varible hasnt be declared

#Include <Misc.au3>

While 1

If _IsPressed("a") Then

Send("b")

EndIf

wend

this gives me no error when i run it but its not doing what i want it to do when i press "a"

Edited by wedding
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...