Archive: Small help


Small help
I have this function as a custom page...


Function SetCustomx
ReadINIStr $7 "$INSTDIR\settings\map-compiler_dir.ini" "Field 11" "State" #if rb 3 is selected, skip page
StrCmp $7 1 ok

ReadINIStr $7 "$INSTDIR\settings\map-compiler_dir.ini" "Field 10" "State" #if rb 1 is selected, show page
StrCmp $7 0 +4
!insertmacro MUI_HEADER_TEXT "Log Map-Compile Settings" ""
InstallOptions::dialog "$INSTDIR\settings\map-compiler_log.ini"
Goto ok

ReadINIStr $7 "$INSTDIR\settings\map-compiler_dir.ini" "Field 9" "State" #if rb 2 is selected, show page
StrCmp $7 0 ok
!insertmacro MUI_HEADER_TEXT "Live Map-Compile Settings" ""
InstallOptions::dialog "$INSTDIR\settings\map-compiler_live.ini"

ok:
FunctionEnd


Basically, if the user selects RadioButton 1 on the page before this page, it shows map-compiler_log.ini IO page.
If the user selects RadioButton 2 on the before page, it will show map-compiler_live.log IO page.

This isn't working correctly.

If user selects RadioButton 1, it works fine, but if user selects RadioButton 2, it shows the map-compiler_log.ini IO page, and then shows the map-compiler_live.log file after it.

It should only show 1 page out of the two depending on which RadioButton the user has slected.

What have I done wrong (tis not often I run into a problem)
I assume it's a typo or something...

Thanks

-Stu

"$INSTDIR\settings\map-compiler_log.ini"

When you run the installer, the above path, is there?


The IO dialogues show up fine, but I want only one of them to show up depending on which RadioButton the user has selected on the previous page.

Currntly, if RadioButton 1 is selected, only 1 page shows, but if RadioButton 2 is selected, both pages show up one after another.

What is wrong?

-Stu


StrCmp $7 0 +4


There's your problem. You are not supposed to use relative jumps over plug-in calls.

So, I shall have to write the dialog content for the different pages into the same ini file then...

Edit: ok I get it, so I need to use a proper target for the jump rather than a reletive jamp (+4)

-Stu