Guest Joccunha Posted July 22, 2005 Share Posted July 22, 2005 Good morning for all. I am needing to do in AutoIt the routine that before was in DOS and it stopped working when I installed Windows XP because it doesn't recognize "% " copy \\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PRINCIPAL\%1.NC C:\CNC8070\USERS\PRG\PRINCIPAL.NC copy \\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PROG2\%1.NC C:\CNC8070\USERS\PRG\PROG2.NC copy \\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PROG1\%1.NC C:\CNC8070\USERS\PRG\PROG1.NC In DOS% was to type the name of the file. I am Brazilian and I don't write very well in English. Excuse me Link to comment Share on other sites More sharing options...
LxP Posted July 22, 2005 Share Posted July 22, 2005 Is this what you want? -- fileCopy("\\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PRINCIPAL\" & $cmdLine[1] & ".NC", "C:\CNC8070\USERS\PRG\PRINCIPAL.NC") fileCopy("\\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PROG2\" & $cmdLine[1] & ".NC", "C:\CNC8070\USERS\PRG\PROG2.NC") fileCopy("\\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PROG1\" & $cmdLine[1] & ".NC", "C:\CNC8070\USERS\PRG\PROG1.NC") Link to comment Share on other sites More sharing options...
Guest Joccunha Posted July 22, 2005 Share Posted July 22, 2005 Thanks for your help but it didn't work. It follows mistake msg. --------------------------- AutoIt Error --------------------------- Line 0 (File "U:\Script\AutoIT\emerson\importCNC.exe"): fileCopy("\\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PRINCIPAL\" & $cmdLine[1] & ".NC", "C:\CNC8070\USERS\PRG\PRINCIPAL.NC") fileCopy("\\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PRINCIPAL\" & ^ ERROR Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded. --------------------------- OK --------------------------- Link to comment Share on other sites More sharing options...
LxP Posted July 22, 2005 Share Posted July 22, 2005 You need to call the script with a parameter (as you did for the DOS batch file):"U:\Script\AutoIT\emerson\importCNC.exe" myParameterThe $cmdLine[1] in the code above is equivalent to the %1 in the batch file. Link to comment Share on other sites More sharing options...
CNCMONKEY Posted November 6, 2010 Share Posted November 6, 2010 You need to call the script with a parameter (as you did for the DOS batch file): "U:\Script\AutoIT\emerson\importCNC.exe" myParameter The $cmdLine[1] in the code above is equivalent to the %1 in the batch file. Thank you, I also tried something like this but failed to use a parameter. great explanation Link to comment Share on other sites More sharing options...
JoHanatCent Posted November 7, 2010 Share Posted November 7, 2010 (edited) The previous .bat file should still work as before. You'll have to identify the file that needs to be copied out from: \\M023082\CNC\REDE1\USIEIXOS.A\CNCWEG\FACEAD_4\PRINCIPAL\?????.nc to the three new locations. Then do: "U:\Script\AutoIT\emerson\importCNC.exe" ????? Edited November 7, 2010 by JoHanatCent 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