Terenz Posted June 5, 2015 Share Posted June 5, 2015 I need to automate a commandline. Pratically the "original" one do something like:soft.exe --myparam -y "X:\Path\File" anotherparamAnd my compiled take the same:myexe.exe --myparam -y "X:\Path\File" anotherparamBut with a difference to do other things ( like cleanup, file removing etc ) unlike of the original one. The script for the command line part is:Global $sParam If $CmdLine[0] >= 1 Then ; command line For $x = 1 To $CmdLine[0] $sParam &= $CmdLine[$x] & " " Next EndIf $sParam = StringTrimRight($sParam, 1) ; remove last space MsgBox(0,0,$sParam) Run(@ScriptDir & "\soft.exe " & $sParam)The problem is the " the $CmdLine just remove it, don't care if i'll make double "" in the final string is always:--myparam -y X:\Path\File anotherparamFirst, why? And in second place what i need to do for passing exactly the same string like i have write in CMD?Thanks Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
Developers Jos Posted June 5, 2015 Developers Share Posted June 5, 2015 First, why? And in second place what i need to do for passing exactly the same string like i have write in CMD?That is how it works with batchfiles as well, but look at $CmdLineRaw for the whole original commandline and strip the beginning.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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