Question : Help Reqd. for AutoIt Script

Hi All,
I need some help on AutoIt.

My Sample Script.
---
Dim $sUserName = "MyID"
Dim $sPassword = "MyPass"
Dim $sDomain = "mydomain"
Dim $sFile = @TempDir & '\getudn.txt'
$uDn = FileRead($sFile)
$sPw = RunAsWait($sUserName, $sDomain, $sPassword, 0, @ComSpec & ' /k commandx user' $uDn '-pm")


content of the getudn.txt

SomeVariableParameters


I need to add that variable Parameters in autoit @ComSpec like follows..

$sPw = RunAsWait($sUserName, $sDomain, $sPassword, 0, @ComSpec & ' /k commandx user $uDn -pm")

to

$sPw = RunAsWait($sUserName, $sDomain, $sPassword, 0, @ComSpec & ' /k commandx user SomeVariableParameters -pm")


Where $uDn = SomeVariableParameters

Any help will be appreciated.

Thanks
Saugata

Answer : Help Reqd. for AutoIt Script

Hmm, I figured it out, Problem is with getudn.txt, at the time of creation on this file, every time it added a extra line a the end, and when i used FileRead, i am having problem, now i changed to
$uDn = FileReadLine($sFile, 1)

It worked fine..

Thanks
Saugata
Random Solutions  
 
programming4us programming4us