Jump to content

Recommended Posts

Posted

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

Posted (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 by FireFox
Posted

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.
 
 
 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...