Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] Frequently Asked Questions > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-26-2007, 12:27 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,612
How can I test for the existence of a macro in script code?

VBScript:

Version #1 (look for a macro of any type with the given name)

Code:
If Not vbld_AllMacros()("MACRO_NAME") Is Nothing Then
  Builder.LogMessage "MACRO_NAME exists"
Else
  Builder.LogMessage "MACRO_NAME does not exist"
End If
Version #2 (look for a temporary macro with the given name)

Code:
If Not vbld_TempMacros()("MACRO_NAME") Is Nothing Then
  Builder.LogMessage "MACRO_NAME exists"
Else
  Builder.LogMessage "MACRO_NAME does not exist"
End If
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is On



All times are GMT -5. The time now is 07:59 AM.


Copyright 1999-2019 Kinook Software, Inc.