Sign in to follow this  
Followers 0
Guest tombo

Quick question, working on my fisrt script

5 posts in this topic

i'm trying to simulate the down arrow key in my keyboard but when my script gets to that section, it's not recognize, here is my weak script :I

Sleep (9000) ;

$craft = 1 ;

While $craft < 2 ;

Send ("{Enter}")

Sleep (1000) ;Sleeps

Send ("{Enter}")

Sleep (1000) ;Sleeps

Send ("{Enter}")

Sleep (1000) ;Sleeps

Send ("{DOWN}") ;<==== this section won't work :D

Sleep (1000) ;Sleeps

Send ("{Enter}")

Sleep (1000) ;Sleeps

$craft = $craft + 1

WEnd

i learned the down command from the help file.. is this right?

Share this post


Link to post
Share on other sites



ummm... english please.. how can i fix it so that my game recognizes it?

Share this post


Link to post
Share on other sites

i learned the down command from the help file.. is this right?

The code is good, but some games won't work with a straight send.

Please see the SendKeyDownDelay option of the Opt command. Some games require that the keypress be held down for longer so that it is recognized by the game.

Also, you don't need to use a 1 second sleep inbetween each keypress. Instead, see the SendKeyDelay options (also under the Opt command.) Then you can send all your keys at once. So you'll probably need to do these steps:

  • Set the key delay to 1 second
  • Send the keys before your down keystroke
  • Set the KeyDownDelay to a bit longer to give the game time to see the keystroke
  • Send the down keystroke
  • Set the KeyDownDelay back to default (because the stuff after your down keystroke probably is good)
  • Send the rest of your strokes
Note that this method only uses 3 sends instead of one Send command for each character.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Yes, but your game fondles the keyboard input trilaterally, bisecting the intended receptor into polar and bipolar segments.

:D

Share this post


Link to post
Share on other sites

yayyyyyy

pekster you were right on... thx a bunch guys

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