04-25-2018 04:14 AM
Hi ,
I am Implementing Command Line support for my tool.
I've added it as well using the help from this reference.
Now after finishing, the command line control does not return to the prompt.
So I manually need to press enter key. Is there a way where I command prompt comes automatically after finishing the process. Also 2nd line in the below sample is unnecessary. Is there a way I can remove it as well.
C:\Work\builds\AutomationTool>Automation -h
C:\Work\builds\AutomationTool>
Automation Tool v1.0 - Executes Scripts in Automated environment
Usage: Automation [-r all | <script name> <repeat count (default = 1)>]
Automation [-h] [-v]
-r Run test
all - Run all the scripts.
-h show this help message and exit.
-v Shows version information and exit.
05-03-2018 05:40 AM
Its surprising that there is no solution to my problem.
05-03-2018 12:02 PM
Well, this forum is about LabVIEW. Your question is about the command line.
I'm not saying your question has nothing to do with LabVIEW, just that I can't really tell how it's related.
Maybe if you explain your question from a LabVIEW perspective, we will better understand the problem from our point of view?
05-08-2018 05:52 AM
Yes the question is about command line support in Labview. It is not about other environment. If LabView supports passing of command line arguments then there should be some standard way of doing it as well.
My tool is developed in LabView and I 'm willing to run it from command line as well.
So the question is about how it can be achieved in LabView?
05-08-2018 06:36 AM - edited 05-08-2018 06:38 AM
@lvbms wrote:
Yes the question is about command line support in Labview. It is not about other environment. If LabView supports passing of command line arguments then there should be some standard way of doing it as well.
My tool is developed in LabView and I 'm willing to run it from command line as well.
So the question is about how it can be achieved in LabView?
Who said LabVIEW supports command line interface? Pretty sure it's a Windows application that does not (pretend to) support CLI.
It's possible, but two way communication through the CLI is difficult.
The command line will be given back to the user when your application terminates.
05-08-2018 06:37 AM
Is it just the -h that requires Enter or all parameters? Do your program exist correctly after performing 1 command? This sounds like a problem with your code, can you post it?
/Y
05-08-2018 07:00 AM - edited 05-08-2018 07:00 AM
Here is how we did command prompt interface back in the day. I don't do much with this kind of stuff any more. You pass the string to the command line and hit go.
05-08-2018 07:04 AM
@aeastet wrote:
Here is how we did command prompt interface back in the day. I don't do much with this kind of stuff any more. You pass the string to the command line and hit go.
I though the LabVIEW executable was "Automation", and that it was called from the command line, not the other way around?
05-08-2018 07:06 AM
So are trying to call a LabVIEW program from the command line? If you are then that really is not a LabVIEW problem as stated above. That would be DOS. I am sure there is a forum for DOS help somewhere on the internet.
05-08-2018 07:20 AM
@aeastet wrote:
So are trying to call a LabVIEW program from the command line? If you are then that really is not a LabVIEW problem as stated above. That would be DOS. I am sure there is a forum for DOS help somewhere on the internet.
I agree with OP that part of the problem is LabVIEW related.
LabVIEW simply doesn't do CLI very well (and doesn't pretend to).
The solution that's used at the moment let's LabVIEW return something on the CLI. But the CLI won't be released until the executable stops running. That's pretty much how any CLI application works.
It seems you want to:
+ Start a LabVIEW application
+ Use CLI to send some commands
+ Get back the replies from LabVIEW while the application continues running
That is possible, but I think a different approach is needed. Confirm that that is what you (OP) want, and we can follow that route.