process

Wait for all child processes of a ran process to finish C#

社会主义新天地 提交于 2020-01-16 01:27:10
问题 I'm developing a Launcher application for games. Much like XBOX Dashboard in XNA. I want to open back my program when the process which it started(the game) exits. With a simple game this is working: [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool SetForegroundWindow(IntPtr hWnd); [DllImportAttribute("User32.DLL")] private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); private const int SW_SHOW = 5; private const int SW_MINIMIZE = 6; private

Check Which Website is Visited

有些话、适合烂在心里 提交于 2020-01-15 11:25:08
问题 I've been having trouble finding a way to check if the user of the program is visiting a specific website. If I wanted to open a pop up box telling me which website I was currently on, what would be the best way to do it? I've been thinking about various ways but I can never come to a definite conclusion. Thought about checking which browser is open by browsing the processes or checking the window, but how would I find it out? Even if I didn't find out exact website address but just the name,

Play Framework - Checkbox processing

ε祈祈猫儿з 提交于 2020-01-15 10:15:35
问题 How do I process a checkbox input in Play! Framework? Should I catch the value as a String at the controller? How to get what values are checked by a user? This is the html code of my checkbox #{list items:categories, as:'category'} <tr> <td><input type="checkbox" name="category" id="category-${category.name}" value="${category.id}" /><label for="category-${category.name}"> ${category.name}</label></td> </tr> #{/list} 回答1: I think if you have a List<String> category in your form action, you

Send a String From Child Application to Parent

不打扰是莪最后的温柔 提交于 2020-01-15 09:44:21
问题 My VB.NET WinForms program (parent) calls another VB.NET Console program (child) with Process.Start() . The child application runs quickly and I would like a status message returned to the parent. How can I send a string from the child to parent? Is there some built-in way because of the parent-child relationship or must I use some other interface like sockets? 回答1: Just to add some code to my other comment, imagine the following simple child program: Module Module1 Sub Main() Console

Exchange data between two Python processes

有些话、适合烂在心里 提交于 2020-01-15 06:29:30
问题 I have an Arduino which sends a JSON packet to a Python process (PP1). This Python process will run continuously. But this process has to invite and receive JSON packets to another Python process (PP2). Basically PP1 has to pass the JSON packet received from Arduino to PP2. And PP1 has to receive commands packets from PP2 (can be in JSON format too). Link to architecture image: Bellow a begin the code of Python process 1 import json #open port serialport = serial.Serial('COM5',38400,timeout=1

Run .bat file from C#

无人久伴 提交于 2020-01-15 06:08:43
问题 i am facing a strange issue , i have a .bat file which contains a code for renaming a file , when i open the .bat file manually it does what it is written on it which is renaming a file , but when i try to open it programtically from C# , it doesnt do anything , it jsut open the file and do not compile what it is written into . i typed that code : Process.Start(@"file.bat"); I also knew if you typed the path into cmd and pressed enter it will open the file and compile it , so i wrote that :

Run .bat file from C#

廉价感情. 提交于 2020-01-15 06:06:47
问题 i am facing a strange issue , i have a .bat file which contains a code for renaming a file , when i open the .bat file manually it does what it is written on it which is renaming a file , but when i try to open it programtically from C# , it doesnt do anything , it jsut open the file and do not compile what it is written into . i typed that code : Process.Start(@"file.bat"); I also knew if you typed the path into cmd and pressed enter it will open the file and compile it , so i wrote that :

Reading Standard Output from a Command Line process without newline

折月煮酒 提交于 2020-01-15 05:49:10
问题 I'm writing a C# GUI Wrapper that wraps around an executable (which I CAN NOT modify because I do not have the source code). The problem I'm facing appears to be related to the fact the executable output does not end with a 'newline' character. Instead, the .exe starts work and expects user input (s=status, q=quit, etc..). I've spent a lot of time researching various ways to read StdOut, one with Asynchronous reads and listening for events, and the other method was with separate threads

How to execute completely independent application from Java. Like independent process

邮差的信 提交于 2020-01-15 03:50:09
问题 I have one main application which launch two other process's, i just need to launch them as an independent process. like running them-self without using or sharing my main application launcher process memory or cpu. But when i launch it like this TWO other process do not get executed (well they create TWO new process but not fictional), unless i kill the main process. My plan is to execute it under windows just like THREE command prompt where it execute THREE application. How do i resolve it

Does QProcess::close() raise the unix SIGTERM signal on the process?

你。 提交于 2020-01-15 03:12:13
问题 In Linux/Qt I have a GUI application. The GUI starts up additional child processes using QProcess. To close the child processes I use QProcess::close(). Does QProcess::close() raise the unix SIGTERM signal for the child process? (I have linked to the Qt documentation for QProcess and close() because I can not tell from the documentation if a unix signal is raised...) UPDATE: changed question to ask about a specific unix signal: SIGTERM. 回答1: Today I found out that QProcess::close() does not