Sign in to follow this  
Followers 0
Angel

Controlling Visual Studio 2005 with AutoIt via COM

3 posts in this topic

Hi,

I am trying to automate the installation of some macros into Visual Studio 2005. Currently I am just using AutoIt to send keystrokes, wait for windows etc. However this has certain limitations and is a bit error prone. So I would like to try to automate Visual Studio through COM. I'd like to create a Visual Studio 2005 object in my AutoIt script and use COM to install some settings, load some macros, etc.

I found some microsoft pages that explain that to create a new instance of Visual Studio 2005 you can use (in Visual Basic) the following code:

CreateObject("VisualStudio.Solution.8.0", "")

or

CreateObject("VisualStudio.DTE.8.0", "")

So I tried using ObjCreate("VisualStudio.DTE.8.0"):

Dim $oVS = ObjCreate("VisualStudio.DTE.8.0")

$oVS.ExecuteCommand("Tools.MacrosIDE")

I was expecting this to start Visual Studio and opening the Macros IDE, but this does not seem to be the case.

So do you guys know if this is possible and if so what I am doing wrong?

Thanks!

Angel

Share this post


Link to post
Share on other sites



In general, two good ways to figure out an application's COM object model are to

1) research application's website

2) find vbscript / vba snippets that do what you want, and convert / deduce / adapt to your needs.

Best wishes.


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

I actually did both. I think that I have a good idea of the automation model of Visual Studio, which is pretty well documented. However I am not even able to start Visual Studio itself. Does someone have some experience with this?

Angel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0