Exit Codes from command line programs

Discussions about CSEntry
Post Reply
Pierre

Exit Codes from command line programs

Post by Pierre »

Hello Josh and Greg,
I want to take advantage of cmd line error codes and use the resulting code in in my entry application without having to use any other services or complicating the system by passing parameters through a text file.

Let me know if this is possible.

By the way ... adding this feature to execsystem() can be valuable for android applications.

Thanks,
Pierre
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Exit Codes from command line programs

Post by josh »

I don't think it is possible to get the command line error code easily with execsystem. I would write out a .bat file that runs your command line program, checks the error code and writes the result out to a file or something along those lines. It would work but would not be simple.

Not sure I understand what you mean about this being usefull on Android? Android doesn't have the same model for launching programs as Windows does. On Android you can launch apps by starting their activities (using "app:" in execsystem) but this launches a UI that isn't neccessarily going to end and return anything the way a DOS command would. Or would you want to able to run unix shell commands from within CSPro?
Pierre

Re: Exit Codes from command line programs

Post by Pierre »

Thanks Josh,
Will try to pass the exit code parameters though a text file. I was thinking there was an easier way because I am using curl to transfer data and the program uses specific exit codes. As for the Android I was thinking the unix shell, but I think that is going overboard. hehehe. You guys are awesome and the both of you should come back to the Pacific again for some beers.

Laters,
Pierre
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Exit Codes from command line programs

Post by josh »

We would both love to get back to the Pacific one of these days and catch up!
Post Reply