|
#1
|
|||
|
|||
Determining if a Step is checked
I am trying to determine if 'Am I Checked' is checked and then set a macro based on the result. This example only works for the current Step. How do I reference 'Am I Checked' in the script?
<?xml version='1.0'?> <project version='5'> <step action='Set Macro' type='0'> <MacroName>test</MacroName> <checked type='11'>0</checked> <indent type='3'>1</indent> <name>Am I Checked</name> </step> <step action='Run Script' type='0'> <Language>VBScript</Language> <Script> <![CDATA[set pstep = step if pstep.checked then msgbox "set a macro" else msgbox "delete a macro" end if ]]></Script> <indent type='3'>1</indent> <name>VBScript</name> </step> </project> |
#2
|
|||
|
|||
If you know where the step is, you could use
If Project.Steps(vbldStepMain)(1).Checked Then ... To locate the step by name, use index = Project.FindStep("Am I Checked", vbldStepMain) If Project.Steps(vbldStepMain)(index).Checked Then ... |
Thread Tools | |
Display Modes | Rate This Thread |
|
|