microsoft / VS-Macros

An extension for Visual Studio 2013+ that enables the use of macros in the IDE. The extension can record most of the features in Visual Studio including text editing operations.
Other
131 stars 41 forks source link

Allow writes to Ouput panels #28

Open fspafford opened 8 years ago

fspafford commented 8 years ago

Please consider adding the ability to write to a "named" Output panel.

I have used VB macros where I can write macro output to an Output panel, with a name like "My Ouput Name". The output can be viewed just like "Show output from: Build".

jon-freed commented 7 years ago

These new macros can set the status bar text with code like the following:

dte.StatusBar.Text = "display this text in the status bar";

And, they can write text to the Output panel with code like the following:

var outputWindowPane = dte.Windows.Item("{34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3}").Object.ActivePane;
outputWindowPane.Activate();
outputWindowPane.OutputString("display this text in the output window panel");

Note that the output code may fail as is described here.

Other functionality that is available via the "dte" object may be reviewed here: https://msdn.microsoft.com/en-us/library/envdte.dte.aspx