Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] User Tips, Tricks and Samples
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-22-2010, 10:15 AM
kodakdave kodakdave is online now
Registered User
 
Join Date: 04-14-2010
Posts: 12
Set Macro as array type

I had asked Support for a way to set a macro as an array type, the way "Read File" can. Such that one can later process that macro in vbscript and apply such functions as UBound to it.

Their quick and correct answer, that I had been unable to find on the forum, was:

//You can't do that with the Set Macro action, but you can use the Run Script action and the object model to do it:

RunScript action containing:
vbld_TempMacros.Add "ARRAY", Array("hello", "goodbye", "test")

Then, as verification, another
RunScript action containing:
arr = vbld_AllMacros()("ARRAY")
For i = 0 To UBound(arr)
Builder.LogMessage "Value " & i & " = " & arr(i)
Next

If this is already mentioned somewhere in the forum, I apologize. If not, then I wanted others to benefit from the tip as well.
Reply With Quote
Reply


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 Off



All times are GMT -5. The time now is 11:19 PM.


Copyright © 1999-2023 Kinook Software, Inc.