Polyphem Posted January 30, 2007 Posted January 30, 2007 Hi, i call a program with parameters via RUN(). The number of parameters is variable. At a certain point, the RUN command just stalls... e.g. "test.exe param1 param2 param3 param4" works, but if i add up to 50 parameters and the command line is getting really long, the RUN command does not work. Is there a maxium length? And maybe any way around it? Thanks and Regards This post will be edited again by Polyphem: Tomorrow, 11:55 AM
Danny35d Posted January 30, 2007 Posted January 30, 2007 Any of the parameters has blank spaces. Any parameters with blanks space need to be between quotes (")test.exe param1 param2 param3 param4 "param 5" "param 6" AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Polyphem Posted January 30, 2007 Author Posted January 30, 2007 Thanks for the reply. Thought about that allready, all quoted. It only has to do with the length? Is there a 256 character limit? The parameters are in a variable. Currently i write the command to a temp .bat and start that. But thats only an imperfect work-around. This post will be edited again by Polyphem: Tomorrow, 11:55 AM
Moderators SmOke_N Posted January 30, 2007 Moderators Posted January 30, 2007 I'm not aware of a limit myself, and I couldn't find it in the docs either. If this is an AutoIt App, have you looked at possibly $CmdLineRaw? And maybe just parsing from the other app? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Danny35d Posted January 30, 2007 Posted January 30, 2007 Currently i write the command to a temp .bat and start that. But thats only an imperfect work-around. If the same command runs from a batch file it will run from autoit too. I will use ConsoleWrite() to double chech the run() syntax. Ex:ConsoleWrite('test.exe param1 param2 param3 param4 "param 5" "param 6"' & @CRLF) Run('test.exe param1 param2 param3 param4 "param 5" "param 6"', @TempDir) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Uten Posted January 30, 2007 Posted January 30, 2007 There used to be a limit on the char length of all parameters together. So if StringLen($params) > 512|1024|4048 or what it is today you could possibly be in trouble. Not sure if this applies to XP (or Vista) Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
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