getmusicbee.com

Support => Developers' Area => MusicBee API => Topic started by: Akira Q. on November 04, 2021, 11:56:37 PM

Title: Is there any way to open a console window from the API?
Post by: Akira Q. on November 04, 2021, 11:56:37 PM
So I went through the tutorial on how to set up a MusicBee plugin on the wiki, but I was wondering if there was any way to just open a standard console window.
Forms are good but just having something which I could easily send text to (especially with my very rudimentary C# knowledge) would be extremely helpful. Thanks!
(Just as a note, I tried just doing a standard write to the console and tried a few things in settings but I couldn't get anything working)
Title: Re: Is there any way to open a console window from the API?
Post by: Rotom on February 20, 2022, 03:07:03 PM
If it's for piping the output of one program to another, not really sure how I'd go about that, but if it's for debugging a plugin and you're using Visual Studio, you could use Debug.WriteLine(). Remember to import the System.Diagnostics namespace though:

Code
using System.Diagnostics;
Title: Re: Is there any way to open a console window from the API?
Post by: inderkumar on May 30, 2023, 06:08:16 PM
Having a standard console window can indeed be useful, especially for sending text easily.
While I'm not familiar with the specific requirements of MusicBee, in C#, you can use the AllocConsole function from the kernel32.dll library to create a new console window. Alternatively, you can redirect the standard input/output using the Console class in C# to achieve similar functionality.
If you're still looking for more guidance or examples, https://www.zaptest.com/grey-box-testing-what-is-it-types-process-tools (https://www.zaptest.com/grey-box-testing-what-is-it-types-process-tools) might have some helpful resources. They provide insights into grey box testing, which could potentially offer some valuable information related to your question.
I hope this helps, and best of luck with your MusicBee plugin development!