Sign in to follow this  
Followers 0
MasonMill

send with variable

6 posts in this topic

Why doesn't this work? Am I missing something? It doesn't highlight yellow like it normally does. I just want to send w down when i assign $w as w.

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

Thanks!

Share this post


Link to post
Share on other sites



Your send command seems to be good for hold a key down...

But have you activate the gui or windows before ?


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

I'll go take a look again, it didn't seem to work. Ya I activated it. Thanks for the input!

Share this post


Link to post
Share on other sites

Maybe force string concat before Send ?

Local $keydown = "{"& $w &" down}"
Send($keydown)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Maybe force string concat before Send ?

Local $keydown = "{"& $w &" down}"
Send($keydown)

I don't think so...

MasonMill, wich type of window do you activate ?

Tried your send command on notepad...

Run ( 'notepad' )
Sleep ( 1000 )
$w = 'w' 
WinActivate ( "[CLASS:Notepad]", "" )
Send ( "{" & $w & " down}" )
Send ( "{a down}" )

and it works !

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

ya thanks for the help guys, just threw me off when i didnt see the yellow and i didnt cut and paste so long story short lost in translation! Thanks for the help, and learned a couple things along the way!

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