Sign in to follow this  
Followers 0
daxle

Having trouble sending keys to a game

11 posts in this topic

Ok here is my script:

$s=5

$m1="Ugggh, come on people, we need a line to the sky here!"

$m2="Nobody can kill me!"

$m3="Rofl!"

$m4="Death to everybody!"

$m5="I am invinsible!"

$m6="Ok everybody, listen up, we need a huge line to the sky!"

WinWaitActive("Jedi Academy")

While $s=5

Sleep(40000)

sleep(5000)

send("1")

sleep(2000)

send("1")

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("y")

sleep(500)

send($m1)

sleep(500)

send("{ENTER}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("y")

sleep(500)

send($m2)

sleep(500)

send("{ENTER}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("y")

sleep(500)

send($m3)

sleep(500)

send("{ENTER}")

sleep(5000)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("y")

sleep(500)

send($m4)

sleep(500)

send("{ENTER}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("y")

sleep(500)

send($m5)

sleep(500)

send("{ENTER}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("{LEFT 90}")

sleep(500)

Send("{RIGHT 90}")

sleep(500)

Send("y")

sleep(500)

send($m6)

sleep(500)

send("{ENTER}")

WEnd

Now i know its executing because if i minimize the game (Jedi Knight Jedi Academy) the script takes effect, i think its having trouble writing to the game window. If somone could please help, i would appreciate it!

Share this post


Link to post
Share on other sites



You know that Send("!") sends alt keystroke? Maybe you mean:

$m1="Ugggh, come on people, we need a line to the sky here{!}"

Anyway... please explain better.

Share this post


Link to post
Share on other sites

You know that Send("!") sends alt keystroke? Maybe you mean:

$m1="Ugggh, come on people, we need a line to the sky here{!}"

Anyway... please explain better.

thanks but pressing alt in the game doesnt matter, the problem is that it is simply not sending the keys to the game window, do you suggest i use control send? im new at this

Share this post


Link to post
Share on other sites

You should learn loops.

while 1
send("j")
send("k")
sleep(1000)
wend

Would keep sending jk.

i was going to make the thing into a giant loop, i jyst wanted it to say different things at different times, is there any way to set a goto or macro, where you just say @mymacro and it runs say,
Send("{LEFT 90}")
Send("{RIGHT 90}")

Share this post


Link to post
Share on other sites

i was going to make the thing into a giant loop, i jyst wanted it to say different things at different times, is there any way to set a goto or macro, where you just say @mymacro and it runs say,

Send("{LEFT 90}")
Send("{RIGHT 90}")
You would be looking more @ a function.

Func MyFunc()
Send("")
Send("")
EndFunc ;==>MyFunc

Share this post


Link to post
Share on other sites

use this:

ControlSend ( "Jedi Academy", "", "", "text here" , 1)

instead of send

Share this post


Link to post
Share on other sites

thanks for the help all, but it didnt work :)

Share this post


Link to post
Share on other sites

are u sure the window's title is right? post the information u get with Autoit Info Tool

Share this post


Link to post
Share on other sites

Yeah, i got it right from the window thing, should i try abbreviating or do you have any other suggestions?

Share this post


Link to post
Share on other sites

Dose it have any type of "Anti-Hack" maybe something like "Punk-buster" or "Game-guard" if so that might be whats causing your error. If it has an "Anti-hack" then post back with the name of the "Anti-Hack" and I might be able to help you.


Latest Projects :- New & Improved TCP Chat

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