Zeljo Posted October 27, 2013 Posted October 27, 2013 Hi, I am trying to implement launching Putty with AutoIt. I have Putty configuration session I named it 'testcom11'. It saves Putty session with com11 and baudrate and so on. I implemented in AutoIt line as : Run ("putty -load testcom11") It works fine. I was able to launch Putty with my session and Putty windows pops up and I was able to type 'AT' command to putty window. Now I want , instead of to hard coded one session, to pass session from command line like this : myAutoItprogram.exe testcom11 I put in AutoIt line : $cmp = $CmdLine[1] I can see it passed correctly when I print ( diplay in , let's say, MsgBox) $cmp it shows testcom11. In next line I have : Run ("putty -load $cmp") However AutoIt launches Putty only with window asking me to load session. So clearly it didn't read -load $cmp option. As you can see I am novice to AutoIt, so if you can see if it is something with how it handles $cmp in Run Window or something else. Thank you in advance, Zeljo
FireFox Posted October 27, 2013 Posted October 27, 2013 (edited) Hi,Welcome to the autoit forum On 8/25/2013 at 10:35 AM, FireFox said: The variables are not interpreted like in PHP whenever they are in a string.Please have a look at the help file, or debug your script with a MsgBox or ConsoleWrite to see that it's not working the way you want.Run("putty -load " & $cmp)NB: use autoit code tags to post your code Br, FireFox. Edited October 27, 2013 by FireFox
Zeljo Posted October 28, 2013 Author Posted October 28, 2013 Hi FireFox, Thank you so much . Run("putty -load " & $cmp) did a trick I tested today . it works the way I want. I am happy Thank you again.
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