Page 1 of 1

keyPressedLocal Problem

Posted: Fri Oct 30, 2009 1:03 pm
by S3v3n11
I have a very simple waypoint file:

Code: Select all

<waypoints>
	<!-- #  1 --><waypoint x="-47" z="-401">
	yrest(2000);
  printf ("Starting \n");
  keyPressedLocal(key.VK_7)
	yrest(2000);
  keyPressedLocal(key.VK_7)
	yrest(2000);
  keyPressedLocal(key.VK_7)
	yrest(2000);
		</waypoint>
</waypoints>
But when I run the bot it does not press the 7 key. If I click the 7th spot with the mouse the command runs and if I hit the 7 key on the keyboard the command runs.

Any ideas?

I am using the latest SVN.

Re: keyPressedLocal Problem

Posted: Fri Oct 30, 2009 1:13 pm
by Administrator
S3v3n11 wrote: But when I run the bot it does not press the 7 key. If I click the 7th spot with the mouse the command runs and if I hit the 7 key on the keyboard the command runs.

Any ideas?
Probably because keyPressedLocal() checks if a key is pressed, not simulates a key press. Use keyboardPress().

Re: keyPressedLocal Problem

Posted: Fri Oct 30, 2009 11:57 pm
by S3v3n11
:oops:

Sorry about that! :(