Sign in to follow this  
Followers 0
Vert

Simple Question

6 posts in this topic

#1 ·  Posted (edited)

Hello, I have a quick question regarding the Send() function. I would like to know if it is possible to store a variable, then use it as such:

$x = "A"

Send("{" && $x && " down}")

Of course, what I have above doesn't work, but that's basically what I need to do: my program gets the input of a single key from the user, then tries to hold it down. How do I accomplish this?

Edited by Vert

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello, I have a quick question regarding the Send() function. I would like to know if it is possible to store a variable, then use it as such:

x = "A"

Send("{" && x && " down}")

Of course, what I have above doesn't work, but that's basically what I need to do: my program gets the input of a single key from the user, then tries to hold it down. How do I accomplish this?

I haven't tested this but you might want to try ....

$x = "A"
Send('{ && }' & $x & '{ && }' & '{down}')

Edit: typo...

Edited by Fossil Rock

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

a few tips when posing code use [*autoit] [*/autoit*] (remover the stars)

and maybe this will work

$x = "A"
Send("$x" &" {down}")

not sure if iishat u wanted

ALso it NOT tested

Share this post


Link to post
Share on other sites

Mayby:

$x = "A"
Send("{" & $x & "down" & "}")

Try it ^^


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Mayby:

$x = "A"
Send("{" & $x & "down" & "}")

Try it ^^

I removed my previous post which contained useless information :)

The example above will not work, since "{" & $x & "down" & "}" results in Adown and you need a space between A and down :) So change it to "{" & $x & " down" & "}". Note the space before down.

More importantly, holding down a key is, as the helpfile states, generally only useful for games. I did it to delay RSI injuries while playing GTA San Andreas :P So whether this works or not depends on what you want to use it for...


Roses are FF0000, violets are 0000FF... All my base are belong to you.

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