I am trying to implement launching PuTTY with AutoIt.
I have a PuTTY configuration session, I named it 'testcom11'. It saves a PuTTY session with settings for com11, baudrate and so on.
I implemented in AutoIt a line as following:
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 an 'AT' command to the PuTTY window.
Now I want, instead of hard coding one session name, to pass a session name from the command line like this:
myAutoItprogram.exe testcom11
I put this line in AutoIt:
$cmp = $CmdLine[1]
I can see it passed correctly when I print (display it with, let's say, MsgBox) $cmp
, it shows testcom11
.
In the next line I have:
Run ("putty -load $cmp")
However, AutoIt launches PuTTY only with the window asking me to load a session. So clearly it didn't read the -load $cmp
option.
As you can see I am novice to AutoIt, so maybe you can see if it is something with how it handles $cmp
in Run Window or something else.