Sign in to follow this  
Followers 0
crest

Help with send() function

5 posts in this topic

#1 ·  Posted (edited)

Hey guys,

im once again in need of your help.

global $var = "{F3}"

send("{"$var"}")

i wanted to store a Keyboard-button in the variable $var, so that its easier to use/change the send()-function whenever i want this button ( F3 ) to be pressed in the active window.

Yet im getting an Error-message right at this point.

Errormessage:

send("{"$var"}")

send(^ ERROR

error: error in expression

And since im rather new to autoit and programming i dont know the right syntax to make this work :whistle:

Hope, someone can help me

Edited by crest

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

send($var)

May not do what you think, i have never tried it... but it shouldn't error-out

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

global $var = "{F3}"
send($var)oÝ÷ ÚÚºÚ"µÍÛØ[  ÌÍÝH ][ÝÑÉ][ÝÂÙ[
    ][ÝÞÉ][ÝÈ  [È ÌÍÝ  [È ][ÝßI][ÝÊoÝ÷ ÚÚºÚ"µÍÛØ[   ÌÍÝHH    ][ÝÑ][ÝÂÛØ[   ÌÍÝH ][ÝÌÉ][ÝÂÙ[
    ][ÝÞÉ][ÝÈ  [È ÌÍÝH [È ÌÍÝ  [È ][ÝßI][ÝÊ
or

...

:whistle:

Edited by PaulIA

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

well, first,

send("{"$var"}")

if $var is {F3} then you end up sending {{F3}}, which I'm assuming you don't want. remove the brackets from $var = "{F3}"

Second, you need to seperate string and variables with the & symbol.

send("{"$var"}")

should be

send("{" & $var & "}")

you're welcome :whistle:

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Thanks to all of you ;)

its working now :whistle:))

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