Archive: !Macros hate labels?


!Macros hate labels?
trying this:


!macro BuscarArch MiArch Seccion FlagNoArch FlagSiArch
ifFileExists $SYSDIR\${MiArch} yay
MessageBox MB_OK|MB_ICONEXCLAMATION "No se encontrĂ³ el archivo..."
SectionSetFlags ${Seccion} ${FlagNoArch}
yay:
SectionSetFlags ${Seccion} ${FlagSiArch}
!macroend


The macro doesn't read the part of yay: .....
Is this normal?
:blah:

What do you mean by doesn't read? Does it not execute it?
I'll assume that si is yes and no is, well, no. According to this code and my poor knowldge of Spanish, ${Seccion} will always be selected because you don't skip the last line if the one before was executed. Is this the problem? Or does it completely ignore what comes after the label? If the second case is what happens to you then try to replace the last line with !error "skip me?" and see if you get the error.


mmm.... the problem is the macro execute first:
SectionSetFlags ${Seccion} ${FlagNoArch}
and then execute:
SectionSetFlags ${Seccion} ${FlagSiArch}
It's suppose to be, if the file doesn't exists, do:
SectionSetFlags ${Seccion} ${FlagNoArch}
else:
SectionSetFlags ${Seccion} ${FlagSiArch}

The macro is this, firs detect the file if is not there then
turn the section with flag 25.
If does then turn section 16

And yes... Si = Yes No = No :p and Seccion = Section...
I think you already know that :D


OK, so like I have said you need to jump over the enabling of the section. It won't jump for you... :)
Add Goto +2 just before yay: and all should work well.


smokin'....
thanks KichiK !!!

Works great...I most build the coolest Installer ;)

PS: I wonder if "LicenseData" will accept html files...


LicesneData doesn't know what HTML files are. It will treat it as a text file. You can open the HTML file in Word and save it as RTF.