View Full Version : Using StatusMessage in VBScript

07-14-2005, 11:43 AM
I don't know VB and I'm just learning VBScript so that's my language of choice for automation for IS stuff. I'm trying to automate builds but my build is erroring and I am trying to figure out what the errors are.

dim ISProject
Set ISProject = CreateObject("IswiAuto1050.ISwiProject")
set ISPC = ISProject.ISWiProductConfigs("MyProduct")
set ISRelease = ISPC.ISWiReleases("MyRelease")
msgbox( ISRelease.BuildErrorCount & " errors.")
set ISProject = Nothing

I see that there are "2 errors." when the build finishes.
I found the reference to StatusMessage event but have no clue how to implement that in VBScript. Can anyone help with this?

07-14-2005, 01:12 PM
StatusMessage might require VB, and not VBScript, since it uses WithEvents. Searching these forums for "StatusMessage" should turn up some code...

07-14-2005, 01:14 PM
Nope. Nothing in VBScript. I've searched the whole site. I'm doing my best to try to make heads'n'tails of the one VBCode example I found since that appears to be my only choice.
Is there NO other way to get output (or to redirect output to a text file or something) from the .Build method other than the StatusMessage?

07-14-2005, 01:23 PM
Is the normal build log created?

07-14-2005, 01:41 PM
No. It isn't even getting far enough to create the subdir for the product configuration.

07-14-2005, 02:41 PM
I found the problem by accident. I was not giving the full path to the .ism in the OpenProject because the .ism is in the same dir as the .vbs file. This worked just fine for doing OpenProject, but it causes a failure when it tries to do the Build. When I supplied the full path the Build worked just fine in my VBScript.

As best as I can tell, you can't use StatusMessage or the other 2 events from VBScript.