I am writing a Fixlet and trying to use the Parameter command. I can create the Parameter just fine, and use it for basic substitutions. Where I’m running into a problem is when I try to make use of it ‘inside’ another substitution, as follows …
Consider the following …
if {x64 of Operating System}
Parameter “Path” = "C:\Program Files (x86)"
else
Parameter “Path” = "C:\Program Files"
endif
further down the action script I want to make use of the original PATH parameter to check if a sub-folder exists …
if {exists folder ({parameter “Path”} & “\SomeSub1”)}
{do some things here under SomeSub1}
endif
if {exists folder ({parameter “Path”} & “\SomeSub2”)}
{do somethings here under SomeSub2}
endif
I can’t get the substitution to work, so I’ve had to resort to nested IF/ELSE/ENDIF statements, and I’d rather avoid them when possible, for readability.
Is there a way to do this without nesting IF/ELSE/ENDIF statements?
Not sure how closely related to the topic this will be, but I’m wanting to use IF THEN ELSE on the command, is that possible (and relatively straightforward)? If so, how would I make the following work?
parameter "ComponentsFactoriesFile" = "<pathname>"
delete {parameter "ComponentsFactoriesFile" of action}
parameter "ExportsFactoriesFile" = "<pathname>"
delete {parameter "ExportsFactoriesFile" of action}
if {exists file "<pathname>"}
then
createfile until DDDDDD
<Exports>
<content>
</Exports>
DDDDDD
copy __createfile {parameter "ComponentsFactoriesFile" of action}
else
createfile until DDDDDD
<Exports>
<content>
</Exports>
DDDDDD
copy __createfile {parameter "ExportsFactoriesFile" of action}