View Single Post
  #1  
Old 09-12-2006, 03:01 AM
julien.evrard julien.evrard is online now
Registered User
 
Join Date: 08-23-2006
Posts: 10
Creating builder in script, with right context

Hi!

i saw in your samples how to create a builder, load a project, and "SyncBuild".
but even if the context of the new application is "automation ", i can't see the GUI for the created builder, even if the script is executed in a application object launched in GUI way.

In fact, i want to create a custom step, and launch a bld project in its "vbld_BuildStep". So, i want the created builder to have the context of the application the custom step is.

this is the code of the custom step:



Function vbld_BuildStep()
Dim objApp, objBld, objMacro

' create VisBuildPro app and build objects and connect
Set objBld = CreateObject( "VisBuildSvr6.Builder" )
Set objApp = CreateObject( "VisBuildSvr6.Application" )


'objApp.Initialize vbldContextGUI this generate an error: Error in Action (VBScript) script code at Line 9, Column 2 (Type mismatch: 'objApp.Initialize')

objBld.Initialize objApp
objApp.Project.Load "myfile"
objBld.SyncBuild

End Function
Reply With Quote