Old 18th January 2010, 09:45   #1
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
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

Last edited by ChocJunkie; 18th January 2010 at 10:02.
ChocJunkie is offline   Reply With Quote
Old 18th January 2010, 10:10   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
As far as I know there's no prefab way to go to an absolute page number. Here's my solution:

code:
!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):
code:
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
MSG is offline   Reply With Quote
Old 18th January 2010, 12:30   #3
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
Thank you, MSG.
I will think about if this will become my solution.
ChocJunkie is offline   Reply With Quote
Old 18th January 2010, 13:35   #4
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
Yeah, it seems I dont want to use the relative method. Therefor I try to understand which message is send to the using
code:
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
ChocJunkie is offline   Reply With Quote
Old 18th January 2010, 16:15   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2010, 16:19   #6
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
Thanks, kichik!

And there is now way to get the number (or whatever) of the current inner window?
ChocJunkie is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump