Jump to content

Having trouble sending keys to a game


Recommended Posts

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!

Link to comment
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
Link to comment
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}")
Link to comment
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
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...