SRL Archive - OSR Help

How Do I Make Simba Press A Button?


Ducksarecool

2012-05-06 07:50:30

hey guys im making a script for a shooting game(http://www.freeonlinegames.com/game/aim-and-fire). There is just one problem. In the game you need to press spacebar to start, im not sure how to do this, i've read in other threads something about "KeyDown" but im not sure. If somebody could tell me that would be great. Ow and i don't just want to know spacebar if anybody knows how to have it type like words or do the arrowkeys that would awsome thanks and sory im new to scripting :):spot:

masterBB

2012-05-06 07:54:21

SendKeys(" ",1);

or

PressKey(32);

Ducksarecool

2012-05-06 07:58:44

From: masterBB
SendKeys(" ",1);

or

PressKey(32);


thanks :D and if i want it type a word would i put

SendKeys("Hello",1);
or do i put
SendKeys("H",1);
SendKeys("e",1);
SendKeys("l",1);
SendKeys("l",1);
SendKeys("o"1);"

masterBB

2012-05-06 07:59:43

SendKeys("Hello",1);

note that the 1 here is the amount ms between key presses. Might be more human at 200-400.

Ducksarecool

2012-05-06 08:11:28

From: masterBB
SendKeys("Hello",1);

note that the 1 here is the amount ms between key presses. Might be more human at 200-400.


ok thats all i needed to know To Thank you very Much :)

telebrb

2013-05-29 07:05:33

Sorry for gravedigging but what key number is Enter?

The Mayor

2013-05-29 07:20:17

From: telebrb
Sorry for gravedigging but what key number is Enter?


TypeByte(Vk_ENTER) or PressKeys(Vk_ENTER) iirc.