Archive: Go to the last page


Go to last page
Hey :)

Is it possible to go from any page of my installer directly to the finish page? I'm using MUI,

I know about http://nsis.sourceforge.net/Go_to_a_NSIS_page, but I would like to know if there's another way to do that. The number of pages contained in my installer changes for different options. I would like a solution where I dont't have to be aware of the possibility that I may have more pages than I 'skip' using 'RelGotoPage' so that I have to adjust the number of pages I skip.

Thanks :)

CJ


As far as I know there's no prefab way to go to an absolute page number. Here's my solution:

!define PAGENUMBER_WELCOME 1
!insertmacro MUI_PAGE_WELCOME
!define PAGENUMBER_ZOMGCUSTOMPAGE 2
page custom ZOMGCUSTOMPAGE
!define PAGENUMBER_LICENSE 3
!insertmacro MUI_PAGE_LICENSE
!define PAGENUMBER_FINALPAGE 4
page custom FINALPAGE
!define PAGENUMBER_INSTFILES 5
!insertmacro MUI_PAGE_INSTFILES


This way when you add/move/remove pages you can update the page numbers at the same time. Then, in the page itself (say, the custom page):
IntOp $R9 ${PAGENUMBER_FINALPAGE} - ${PAGENUMBER_ZOMGCUSTOMPAGE}
Call RelGotoPage


This also works if you skip pages now and then, between ZOMGCUSTOMPAGE and FINALPAGE. But keep in mind that jumping into a custom page that doesn't get drawn (like if it's an nsDialogs page inside an ${If} statement), the installer wil crash. See this thread:
http://forums.winamp.com/showthread....hreadid=316154

Thank you, MSG. :)
I will think about if this will become my solution.


Yeah, it seems I dont want to use the relative method. Therefor I try to understand which message is send to the using

SendMessage $HWNDPARENT "0x408" "$R9" ""
I've only found the message list http://wiki.winehq.org/List_Of_Windows_Messages. But the messages related to 0x408 don't seem to do the trick, do they?
Can someone tell me which message '0x408' is?

Thanks :)

0x400 is WM_USER which means anything above it depends on the control and is not shared through all window classes. Check out the following link for more details:

http://blogs.msdn.com/oldnewthing/ar.../02/55914.aspx

In our case, 0x408 is WM_NOTIFY_OUTER_NEXT and is defined in api.h.


Thanks, kichik! :)

And there is now way to get the number (or whatever) of the current inner window?