|
|
|
|
#1 |
|
Junior Member
Join Date: Jul 2003
Posts: 6
|
programatically changing pages?
hey, new to this thread.
I'm making an installer whose first page (custom page using IO) replaces the "back" and "next" buttons. I want the "next" button to run some code and exit (this works). I want the "back" button to continue onto the next page. Is this possible? One solution I though of (if you can't just jump around to different pages, which is what i hope i can do) is to put a dummy page before it (so it goes back to it) which sets a global var, so the next time through the func i can just return, but if i hit "back" it keeps going back and back and back (somehow the state isnt' getting cleared?) so basically Page custom dummy1 "" Page custom dummy2 "" Page custom realFunction if user hits "back" in realFunction and dummy1 and 2 do nothing shouldn't it go dummy1 dummy2 realFunction (back) dummy2 realFunction ? instead i get dummy1 dummy2 realFunction (back) dummy2 dummy1 any help appreciated |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
There is a way to do this.
Have a dummy page before you're real page. In you're dummy page put "Abort" in the main creation function. In you're real page use this: Function MyDialog InstallOptions::dialog "mydialog.ini" Pop $R0 StrCmp $R0 "success" exit ;next StrCmp $R0 "back" back ;back StrCmp $R0 "cancel" exit ;back back: ### Add you're function/script here ### exit: FunctionEnd -Stu |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2003
Posts: 6
|
I would do this, but what i want the "back" button to do is continue with the other pages in the installer. I can't seem to get rid of the fact that "back" was hit.
the structure i was thinking (similar) was Page custom blankFunc Page custom MyCustomFunc Page components Page directory Page instfiles where MyCustomFunc should have InstallOptions::dialog test.ini Pop $R1 StrCmp $R1 "back" "endLabel" "quitLabel" quitLabel: ; do some stuff Quit endLabel: ; continue onto Page components Function End but, this doesn't continue at all, it goes back to the blankFunc page, and after blankFunc gets called it'll try and go to the page before that! |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: May 2003
Posts: 681
|
does this help?
http://forums.winamp.com/showthread....hreadid=141102 Greets, Brummelchen |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Ah ok.
I have another idea. Do this: code: The should work... -Stu |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Lacking a better idea, let the hacking begin. See attached script.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|