Sign in to follow this  
Followers 0
ihenvyr

NEWBIE! hot key..

5 posts in this topic

:o Pls.. anyone help me bout': allowing me to send UParrow when i press W, DOWNarrow when i press S, LEFTarrow when i press A and RIGHTarrow when i press D..

I'm soooo confused :graduated:

I'm setting up need for speed hot pursuit 2, pls help -so i can navigate A,S,D and F key

as the ARROW Keys.. I want to learn bout' hotkey -and a little help with you mates out there will be

a BIG HELP for me to know..

THaNKS!!

B)


Umbrella Member

Share this post


Link to post
Share on other sites



:o Pls.. anyone help me bout': allowing me to send UParrow when i press W, DOWNarrow when i press S, LEFTarrow when i press A and RIGHTarrow when i press D..

I'm soooo confused :graduated:

I'm setting up need for speed hot pursuit 2, pls help -so i can navigate A,S,D and F key

as the ARROW Keys.. I want to learn bout' hotkey -and a little help with you mates out there will be

a BIG HELP for me to know..

THaNKS!!

B)

Here you go

HotKeySet("{ESC}", "Terminate")
HotKeySet("w", "Up")
HotKeySet("s", "Down")
HotKeySet("a", "Left")
HotKeySet("d", "Right")

While 1
    Sleep(100)
WEnd

Func Terminate()
    Exit 0
EndFunc

Func Up()
    Send("{UP}")
EndFunc

Func Down()
    Send("{DOWN}")
EndFunc

Func Left()
    Send("{LEFT}")
EndFunc

Func Right()
    Send("{RIGHT}")
EndFunc

It is all in the help file.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

:o Pls.. anyone help me bout': allowing me to send UParrow when i press W, DOWNarrow when i press S, LEFTarrow when i press A and RIGHTarrow when i press D..

I'm soooo confused :graduated:

I'm setting up need for speed hot pursuit 2, pls help -so i can navigate A,S,D and F key

as the ARROW Keys.. I want to learn bout' hotkey -and a little help with you mates out there will be

a BIG HELP for me to know..

THaNKS!!

B)

Have you even looked at the helpfile? I dont want to be rude or anything, but if you would have searched any of the terms you used in posting this and the amount of time it took you to post you would already have your script written.

Check out the following functions: Send(), HotKeySet()

Dont ask people to write the script for you.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

B) Hi its working!! Thanks for your help..

but sometimes its not working or too hard to send keys,

is there any problem about directinput? ..one more,

how about holding down the key?

for example -like holding down "W" to accelerate in Need for Speed, sending hold "UParrow"..

is it possible too? :o


Umbrella Member

Share this post


Link to post
Share on other sites

Welcome to the forums!

Often the key sending delay needs to be increased for games. You can do this by adjusting the SendKeyDownDelay option to 50 or more. Refer to Opt() in the help file for information on how to do that.

Share this post


Link to post
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
Sign in to follow this  
Followers 0