Opened 15 years ago
Last modified 15 years ago
#1060 closed Bug
Run return 0, but failed — at Version 1
Reported by: | anonymous | Owned by: | Jon |
---|---|---|---|
Milestone: | 3.3.1.4 | Component: | AutoItX |
Version: | 3.3.0.0 | Severity: | Blocking |
Keywords: | Cc: |
Description (last modified by Valik)
When I use a long argument(more than 120 char) for functions:
Run, RunWait etc, ExitCode off started programm always = 0, but programm not started.
An examples (ex1-work, ex2 doesnt):
ex1:
Set oAutoIt = WScript.CreateObject("AutoItX3.Control") val = oAutoIt.RunWait("calc.exe anParamThatLessThan120Char", "C:\WINDOWS", oAutoIt.SW_MAXIMIZE) ' script waits until Notepad closes WScript.Echo "Program returned with exit code:" & val
Result: Calc started
ex2:
Set oAutoIt = WScript.CreateObject("AutoItX3.Control") val = oAutoIt.RunWait("calc.exe anParamThatMoreThan120CharForExample121charAndEtc_forCheckThisMakeThisStringLEnMoreThan120charsRealyMoreThan120ThankForYourSupport", "C:\WINDOWS", oAutoIt.SW_MAXIMIZE) ' script waits until Notepad closes WScript.Echo "Program returned with exit code:" & val
Result: cals isnt started, but Msbox says that calc returns 0 as exitcode
Thanks
Note: See
TracTickets for help on using
tickets.
Please read WikiStart to learn how to properly post code on the issue tracker. In case you didn't notice: This isn't the forum.
Now, as for the ticket itself... okay, and? The documentation clearly states to check the error property on the AutoItX3 object to see if a call to Run() or RunWait() failed. I don't see you checking that property so the return value of 0 is expected.
Finally, I am pretty sure this is not a bug. There are OS-imposed limits on the length of the command line and its parameters. I'll test it but I don't expect to find a problem in AutoIt(X).