![]() |
#1 |
Junior Member
Join Date: Dec 2010
Posts: 7
|
Dialogs - go to certain pages
Hi All,
Having a bit of trouble getting along with nsDialogs. I want a page to show up at the start (no trouble) and then only display a certain page if a specific button is pressed. My code will become quite complex at the end with lots of different pathways depending on what you click so I thought I would start off simple but I can't get it going. I've attached my code. The code compiles OK but when I run the file and press the button I get 'Dialogs.exe has stopped working'. I want to use nsDialogs because it gives lots of control over the layout. I'm sure that I'm doing something daft, I started from the examples but may be trying to do things the wrong way. Thanks for any help. Cheers, Ben |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You can't show a nsDialogs page just by calling a show function. It doesn't work that way.
http://nsis.sourceforge.net/Go_to_a_NSIS_page Stu |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Dec 2010
Posts: 7
|
Great, thanks, I knew I was doing something daft.
So using RelGotoPage will take me forward or back a number of pages by using certain number, is there anyway to do it by name? |
![]() |
![]() |
![]() |
#4 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
Name? Pages don't have names (You can use a page type multiple times)
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Dec 2010
Posts: 7
|
Each nsDialog page has a name though, is there any way to jump to those particular pages?
|
![]() |
![]() |
![]() |
#6 |
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
No, you can only make relative jumps. What you can do is add a !define page_components 1 etc for each page, and then calculate the relative distance by subtracting the two defines. This way whenever you change the page order, or add/remove pages from your script, you only need to make changes to the defines, not to every single page jump command in your script.
|
![]() |
![]() |
![]() |
#7 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,548
|
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Dec 2010
Posts: 7
|
Solution, kind of
Just thought I would update how I managed to solve this in case it might help someone else.
I put a bit of code in before I created my nsDialogs page which would abort the page if a value wasn't met, it would then move on to the next one. It was a bit of a bodge, but it did the trick. code: I would use StrCpy to define the variable before loading the next page, using the page Leave function. |
![]() |
![]() |
![]() |
|
Tags |
nsdialogs, pages |
Thread Tools | Search this Thread |
Display Modes | |
|
|