View Full Version : list macros from Powershell?
tan125
05-28-2008, 12:47 PM
Using vbscript, you can use vbld_AddDelimValue to set a temporary macro to the value of a list. Is there a method/way to do this within a Powershell step? Is there an equivalent Powershell command that does the same thing?
kinook
05-28-2008, 01:20 PM
PowerShell is not currently integrated to the same degree as Active Scripting languages (VBScript, JScript, Python, RubyScript, etc.), so it doesn't have access to the live VBP object model for creating/updating temporary macros, etc. (deeper integration with PowerShell is something we'd like to add in the future).
From a PowerShell script, you can create another instance of the VBP object model and create/update a global macro, which would then be accessible from the calling VBP project (see attached sample).
tan125
05-28-2008, 01:45 PM
Thanks!
I assume the "2" in $global = $app.Macros(2) refers to the type of macro being created (in this case, global)?
-Tom
kinook
05-28-2008, 01:55 PM
Correct.
http://www.visualbuild.com/Manual/macrosproperty.htm
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.