Jump to content

Help with send() function


crest
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

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