|
Post by sundale on Jul 3, 2012 12:10:02 GMT -5
Having problem using shell$() command. The command is executed, but resulting error condition. The error message read: Runtime Error in program 'priceUpdate': result$ = shell$("descupdate.bat") KeyNotFoundError Actually, the command has executed and I can see the result is OK. But, due to error condition, my RB program stops. WHY and HOW to make/disable the error condition Thanks in advance!
|
|
|
Post by StefanPendl on Jul 3, 2012 17:00:46 GMT -5
Seems there is another DOS error code kicking in.
You may end your batch script with exit 0 to prevent returning an error code, when it runs all the way down to the end.
|
|
|
Post by sundale on Jul 5, 2012 9:19:06 GMT -5
Thanks Stefan, it works!!!
|
|
|
Post by StefanPendl on Jul 6, 2012 2:10:47 GMT -5
Still I think you should investigate, which command returns the error code, just to make sure everything really works.
|
|
|
Post by sundale on Jul 7, 2012 14:24:59 GMT -5
You are right.
But in some case, even if I use exit 0 I still have error condition. So, I coded on error goto [doNext], but it seems on error is not caught, the system crash.
How to make sure at error condition goes to my [doNext] routine and resume?
-thanks
|
|
|
Post by StefanPendl on Jul 7, 2012 14:36:46 GMT -5
There seems to be an error in one of the used batch script commands, I think. I would add a line to output the result of each batch command to be able to further investigate.
Example batch command:
DIR C:\ ECHO DIR returned %ERRORLEVEL%
|
|