Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   Scripting (http://www.kinook.com/Forum/forumdisplay.php?f=35)
-   -   How can I test for the existence of a macro in script code? (http://www.kinook.com/Forum/showthread.php?t=2742)

kinook 06-26-2007 12:27 PM

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



All times are GMT -5. The time now is 09:57 PM.


Copyright 1999-2019 Kinook Software, Inc.