Def Posted October 2, 2004 Share Posted October 2, 2004 I'm sorry, I'm sure this has been addressed but I couldn't find the answer.... From what I've experienced everything with ""'s are interpretted literally, for example: Send("You entered $name") Will send "You entered $name" I saw in the Help file that a combination of &&'s can be used within {}'s, like: Send("+{TAB " & $n & "}") How can I use a variable in a Send()? I imagine if I had a string variable before the send I could do this with Send($var) which leads to my second question, how can I concatenate string varibles with "'s being interpretted literally? Something like: $toSend = StringConcat("You entered", $name) Send($toSend) Thanks for the help and the probable redundant post, Def Link to comment Share on other sites More sharing options...
Def Posted October 2, 2004 Author Share Posted October 2, 2004 I'm retarded... So, to not leave without trying to contribute after I realized my mistake: Strings can be concatonated with & as the help file states: $toSend = "your name is " & $name Send($toSend) or even: Send("your name is" & $name[3] & "{ENTER}") or: Send("your name is" & $name); (make sure if your variable is an array you specify the element of the array ) Sorry for the waste, Def Link to comment Share on other sites More sharing options...
Administrators Jon Posted October 2, 2004 Administrators Share Posted October 2, 2004 The current beta also has a new option (ExpandVarStrings) that allows the expansion of variables within string (like the first thing you tried. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now