Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-27-2003, 01:41 PM
gdanko gdanko is online now
Registered User
 
Join Date: 05-27-2003
Posts: 18
Using VBScript arrays

I want to use VBT to automate software deployments at the office. There are roughly 10 servers I deploy to and they’re split up into two batches. I’ve created arrays to access each server by name and I’d like to access the array variable in VBT. My project in its simple form looks like this:



Foundry (Group)
Initialize Batch1 Variables (VBScript)
Run Loop (Group
Do Stuff Here
Do More Stuff Here
Increment Counter

So the Foundry group initializes some variables and defines an array. The initialize script looks like this.

Dim Batch1(5)
Batch1(0) = "order1"
Batch1(1) = "order2"
Batch1(2) = "product5"
Batch1(3) = "product6"
Batch1(4) = "orderadmin9"

Application.Macros(vbldTemporary).Add "SERVER_NUMBER", "0"
'Application.Macros(vbldTemporary).Add "SERVER_ARRAY", Batch1
Application.Macros(vbldTemporary).Add "TOTAL_BATCH1", UBound(Batch1)

SERVER_NUMBER is a counter that simply defines how many iterations to run. I define it as 0 here because the first element in the array is always 0.
SERVER_ARRAY, which is commented out is where I’d like to pass the array from the VBScript to VisualBuildTool.
TOTAL_BATCH1 is just the number of the highest element in the array.

What I want to happen is in the loop, certain actions will be performed on %SERVER_ARRAY%(%SERVER_NUMBER%)

This should equate to Batch1(0)…(Batch1(4)

But I get errors when I try to move the array over into VBT.

Any help is appreciated.

Last edited by gdanko; 05-27-2003 at 02:51 PM.
Reply With Quote
 


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 12:45 PM.


Copyright © 1999-2023 Kinook Software, Inc.