EnvCommand Mode

This action type for raising of different commands for EnvDTE: https://msdn.microsoft.com/en-us/library/EnvDTE.aspx

sample

How to use

In general, for work with EnvDTE commands you can use our sniffer tool: Settings - Tools - EnvDTE Sniffer

sniffer

The Enum column should describe about place for this command, for example:

{1496A755-94DE-11D0-8C3F-00C04FC2AAE2} 1628 Microsoft.VisualStudio.VSConstants+VSStd2KCmdID.OutputPaneComboList

Where:

  • Microsoft.VisualStudio.VSConstants+VSStd2KCmdID.OutputPaneComboList tells us about operation - OutputPaneComboList

For all this, firstly, you should use MSDN and/or listen in details our sniffer tool.

In most cases you should look first the VSStd2KCmdID & VSStd97CmdID enumerations.

Test commands

v1.1+ is already contains the Raise item to check the all incoming commands inside sniffer.

For older versions you can use the raise(guid, id, customIn, customOut) method from DTEComponent and testing tool from Tools - SBE-Scripts ...

Pre / Post / Cancel

All raised commands will be handled in your scripts - before (Pre flag) executing by VS IDE and after (Post flag).

You can work with both variants as you want.

If you work before executing (by Visual Studio) of catched command, you can also try to cancel this command if needed. For this case, you may catch and suppress any commands from Visual studio for handle only with your scripts (try with About dlg of VS IDE, see below).

Samples

Description Guid Id in out
Open the About dlg of Visual Studio {5EFC7975-14BC-11CF-9B2B-00AA00573819} 271    
Open VS Output Window {5EFC7975-14BC-11CF-9B2B-00AA00573819} 237    
Open VS Output Window with Item name {1496A755-94DE-11D0-8C3F-00C04FC2AAE2} 1627 name  
Close active panel {5EFC7975-14BC-11CF-9B2B-00AA00573819} 288    
Open Solution from path {5EFC7975-14BC-11CF-9B2B-00AA00573819} 217 D:\App\Console1.sln  
Close Solution {5EFC7975-14BC-11CF-9B2B-00AA00573819} 219    
Select All text in editor {5EFC7975-14BC-11CF-9B2B-00AA00573819} 31    
Cut selected text from editor {5EFC7975-14BC-11CF-9B2B-00AA00573819} 16    
Copy selected text from editor {5EFC7975-14BC-11CF-9B2B-00AA00573819} 15    
Paste data from buffer {5EFC7975-14BC-11CF-9B2B-00AA00573819} 26    
Exit {5EFC7975-14BC-11CF-9B2B-00AA00573819} 229    
Create new file OutputLog.txt & Open & activate in editor {5EFC7975-14BC-11CF-9B2B-00AA00573819} 221 OutputLog.txt  

and other…

References