Jump to content

Send key a variable number of times


 Share

Recommended Posts

Hey mates,

In a script I'm working on, I'm trying to send the {DOWN} key a number of times based on a variable or counter. I'm not able to get it to perform like I hoped: it sends the key the same number of times each time regardless of the count. Here's what I'm working with for code:

For $Var = 1 to 10

Send("{DOWN "$var"}")

Next

So what is hoped will happen is that the DOWN key will be hit the number of times the $var says it to be, could anyone point out my error?

Thanks so much,

Greg

Link to comment
Share on other sites

Hey mates,

In a script I'm working on, I'm trying to send the {DOWN} key a number of times based on a variable or counter.  I'm not able to get it to perform like I hoped: it sends the key the same number of times each time regardless of the count.  Here's what I'm working with for code:

For $Var = 1 to 10

Send("{DOWN "$var"}")

Next

So what is hoped will happen is that the DOWN key will be hit the number of times the $var says it to be, could anyone point out my error?

Thanks so much,

Greg

<{POST_SNAPBACK}>

For $Var = 1 to 10
Send("{DOWN " & $var & "}")
Next

Maybe you forgot the ampersands?

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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...