rossnixon Posted August 26, 2008 Share Posted August 26, 2008 I am trying to use a variable in my SEND function.Help example says:$n = 4Send("+{TAB " & $n & "}")My code:$location=7 ;I assigned this value using StringInStr();First I do a Find of certain text in Notepad, then I try the following.Send('{ESC}{RIGHT}{SHIFTDOWN}{RIGHT " & $location & "}{SHIFTUP}')It is only selecting one character instead of seven, when it runs.What else should I try?(Using AutoIt 3.2.10.0 on XP Home) Link to comment Share on other sites More sharing options...
LongBowNZ Posted August 26, 2008 Share Posted August 26, 2008 Try this: $location=7;I assigned this value using StringInStr() ;First I do a Find of certain text in Notepad, then I try the following. Send("{ESC}{RIGHT}{SHIFTDOWN}{RIGHT " & $location & "}{SHIFTUP}") Link to comment Share on other sites More sharing options...
rossnixon Posted August 26, 2008 Author Share Posted August 26, 2008 Try this: Send("{ESC}{RIGHT}{SHIFTDOWN}{RIGHT " & $location & "}{SHIFTUP}")Thanks, working now. I was using Send(' for some simple stuff, and it works. Seems double quotes are required for more complex stuff then. Link to comment Share on other sites More sharing options...
LongBowNZ Posted August 26, 2008 Share Posted August 26, 2008 (edited) I think the problem was you weren't using the same quotes at the start, middle and end. You used ' " " ' I used " " " " I could have also used ' ' ' ' Edited August 26, 2008 by LongBowNZ Link to comment Share on other sites More sharing options...
rossnixon Posted August 26, 2008 Author Share Posted August 26, 2008 I think the problem was you weren't using the same quotes at the start, middle and end.You used ' " " 'I used " " " "I could have also used ' ' ' ' Ahh... now the 'fog' has cleared. I couldn't remember what the & was doing; string concatenation!Thanks again. 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