Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/19/2019 in all areas

  1. I threw this together, and maybe someone will find it useful. I needed to be able to interact with cmd.exe a bit more than the native system exec.vi primitive offers. I used .NET to get the job done. Some notable capabilities: - User can see standard output and standard error in real-time - User can write a command to standard input - User can query if the process has completed - User can abort the process by sending a ctrl-C command Aborting the process was the trickiest part. I found a solution at the following article: http://stanislavs.org/stopping-command-line-applications-programatically-with-ctrl-c-events-from-net/#comment-2880 The ping demo illustrates this capability. In order to abort ping.exe from the command-line, the user needs to send a ctrl-c command. We achieve this by invoking KERNEL32 to attach a console to the process ID and then sending a ctrl-C command to the process. This is a clean solution that safely aborts ping.exe. The best part about this solution is that it doesn't require for any console prompts to be visible. An alternate solution was to start the cmd.exe process with a visible window, and then to issue a MainWindowClose command, but this required for a window to be visible. I put this code together to allow for me to better interact with HandbrakeCLI and FFMPEG. Enjoi NET_Proc.zip
    1 point
  2. The programming term you should look into is Futures and Promises. It is about handling results not yet received (such as defining their order, as you wish to do). Single-element Queues, as TomOrr0W suggests, is what I usually use.
    1 point
  3. I don't know of any ready-built solutions, but I did come up with the idea below when you mentioned not wanting to reorder (there may be a way to do this with channel wires, but I am not really familiar with that feature) (vi is also attached, saved to LV2018): Parallel Processing Order.vi
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.