Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-17-2006, 01:51 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
How do u retain the value of a GLOBAL variable

Hi,

I have a MACRO that gets set upon sucess or failure of the STEP
Sub vbld_StepDone()
if (step.BuildStatus = 0) Then
'bBuildStatus = "Success"
vbld_AllMacros().Item("CONFIG").Value)
vbld_AllMacros().Item("bBUILDSTATUS").Value = "SUCCESS"
STATUS = "SUCCESS"
else
vbld_AllMacros().Item("bBUILDSTATUS").Value = "FAILED"
STATUS = "FAILED"
End If
End Sub

STATUS is declared as a GLOBAL var in the begning (Global section of the script).

But when I try to access the value of STATUS in another MACRO (say "Logg Message") e.g %STATUS% is equal to "SUCESS" or "FAILED", the VisualBUILD Pro always says the condition is evaluated as FALSE ?

Thanks for your help.
Reply With Quote
  #2  
Old 02-17-2006, 02:59 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
A variable STATUS declared in script code is not accessible elsewhere. It appears you have a bBUILDSTATUS macro, which could be referenced via %bBUILDSTATUS% from a step field.
Reply With Quote
  #3  
Old 02-17-2006, 04:20 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
Hi,

This worked.. Thanks. Now If I need to "skip" a specific step in the script, what would be the procedure to do that.

Is there a white papper "except samples" which talks about how VisualBuilds macros etc with VBS can be used?

Thanks
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 06:17 PM.


Copyright © 1999-2023 Kinook Software, Inc.