How to pass variables to MyFunction?
After hour of messing around with variables / searching forums / reading manual I found no way to pass a variable to custom function.. Is that true?? (guess not, I'm just being blind)
Like,
Function DoYourThings
DoSomeStuffTo ${variable}
DoSomeOtherStuffTo ${variable}
FunctionEnd
Then in some section:
Call DoYourThings "c:\temp\blahzor.txt"
And the DoYourThings-function receives "c:\temp\blahzor.txt" and some variable that can be accessed. Simple :P
Of course that does not work, Call won't accept parameters.
Also, I was not able to declare a changable variable as public, to do the same thing a harder way, like this:
var SOMEVAR
Function DoYourThings
DoSomeStuffTo ${SOMEVAR}
DoSomeOtherStuffTo ${SOMEVAR}
FunctionEnd
Section "SomeSection"
StrCpy "$SOMEVAR" "c:\temp\blahzor.txt"
Call DoYourThings
SectionEnd
This does not work either, DoYourThings-function can't access SOMEVAR
:cry: