Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Help using VBP automation for my projects (https://www.kinook.com/Forum/showthread.php?t=5098)

garyb@se.rr.com 10-18-2012 05:19 PM

Help using VBP automation for my projects
 
Guys,

I have a small script that runs in a project step to set a macro value which is used later in the build process. What I would like to do is be able to inspect a project step that is further down the list and see if it is checked before executing the rest of the script. This is what I have but it's not working out...
__________________________________________________ _____________
dim sTemp
dim objMacro
dim prjsteps as variant

for each step in prjsteps
if step.Name = "Build All Platforms" then
if not step.Checked then quit
end if
next

sTemp = InputBox("Do you want to transmit ActiveX32 to the FTP site?","Transmit File","NO")
if len(stemp) < 2 then
Step.BuildStatus = vbldStepStatFailed
else
Set objMacro = vbld_TempMacros.Add("FTPActivex", sTemp)
end if
__________________________________________________ ___________

Its obviously not working as expected and I cannot seem to find a lead on what I am missing.

Just to reiterate, I am trying to determine if a project step has been "checked" to be processed. The latter part of the script works fine.


Any help is appreciated.

kinook 10-18-2012 05:32 PM

Try something like this:
Code:

checked = True
For Each s in Project.Steps(vbldStepMain)
  If s.Name = "Build All Platforms" Then
    If Not s.Checked Then checked = False
    Exit For
  End If
Next

If checked Then
  sTemp = InputBox("Do you want to transmit ActiveX32 to the FTP site?","Transmit File","NO")
  If Len(stemp) < 2 Then
    Step.BuildStatus = vbldStepStatFailed
  Else
    vbld_TempMacros.Add "FTPActivex", sTemp
  End If
End If



All times are GMT -5. The time now is 03:47 PM.


Copyright © 1999-2023 Kinook Software, Inc.