Jump to content

autoit newb, trying to write a simple key press script


Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...