SRL Archive - FAQ

Problems with key presser function. (KeyUp and KeyDown)


Zeta Matt

2013-09-02 20:47:16

Do anyone know, among the Mouse and Keyboard documentation, what is the left arrow key code? The story is below:

The documentation from villavu about key codes isn't updated(find it at http://docs.villavu.com/simba/scriptref/mouseandkeyboard.html). I found, though, a post which was replied with a list of the "correct" codes of all keys (It's the second last reply to the post: http://villavu.com/forum/showthread.php?t=3982?t=4757&highlight=keycode). Most of the codes of this reply are correct, but not one that I really need to use.
The code for left arrow, according to that reply, is 37, but, when I use KeyDown(37); Wait(200) KeyUp(37); I realize that it clicks the right arrow, just like when I use the same script fragment using the right arrow code, according to that reply, KeyDown(39); Wait(200) KeyUp(39);

Ian

2013-09-02 21:20:31

try

PressKey(vk_left);

bgtemp

2013-09-03 01:41:40

37 should work and it works for me.

Zeta Matt

2013-09-07 11:42:58

Thanks everyone =D was a very noob mistake of mine, but you helped me find it ^^