home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Executing an external application....and getting its output
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="samuel337" data-source="post: 55420" data-attributes="member: 10347"><p>I would suggest letting the process run in the background instead of using WaitForExit like you are now because this will freeze up the UI thread (although the command output will continue to work).</p><p></p><p>Add in this line when you setup the ProcessStartInfo object:</p><p>psi.EnableRaisingEvents = true;</p><p></p><p>Remember to subscribe to the Exited event handler of the process object (e.g. ConvertProcess). Do not WaitForExit.</p><p></p><p>Now when one process has finished, the exited event handler will trigger, and you can load the next one. I'd use an enum to keep track of which step the process is at. Also, make sure you reinstantiate your process object everytime you use it.</p><p></p><p>What's wrong with the current code btw (apart from what I've pointed above)? It should run each application one after the other, given you've used WaitForExit.</p><p></p><p>Sam</p><p></p><p>[/code]</p></blockquote><p></p>
[QUOTE="samuel337, post: 55420, member: 10347"] I would suggest letting the process run in the background instead of using WaitForExit like you are now because this will freeze up the UI thread (although the command output will continue to work). Add in this line when you setup the ProcessStartInfo object: psi.EnableRaisingEvents = true; Remember to subscribe to the Exited event handler of the process object (e.g. ConvertProcess). Do not WaitForExit. Now when one process has finished, the exited event handler will trigger, and you can load the next one. I'd use an enum to keep track of which step the process is at. Also, make sure you reinstantiate your process object everytime you use it. What's wrong with the current code btw (apart from what I've pointed above)? It should run each application one after the other, given you've used WaitForExit. Sam [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Executing an external application....and getting its output
Contact us
RSS
Top
Bottom