|
|
|
|
#1 |
|
Senior Member
|
activate greyed buttons at final screen
There are three buttons at the final screen (Exit, Options, Close), two of them greyed (Exit and Options), how could I activate them and write a function for them?
|
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
I wonder, are you referring to NSIS installer?
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
|
|
|
|
|
|
#4 |
|
Senior Member
|
lol, yes I am talking about NSIS
![]() Afrow UK, let's see if you can help me a bit, because the example in that plugin is too complex for me. 3 is the control id of the greyed button "Options", I put this code as a function that loads the page where the button is: code: and then I put this other code as a function when the page is left. code: and that's all, then the greyed button should do what the function ComponentsLeave says, did I understood correctly? |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I found a bit of old text in the readme about the /PARENT parameter which is no longer needed... if you want to grab the Zip again at http://nsis.sf.net/File:ButtonEvent.zip
Yes that code is correct, but I wouldn't recommend using the back button though (because it belongs to the installer), but try it anyway it should still work. $R0 in your leave function will be 3 if your button is pressed or -1 otherwise. A simple StrCmp (or ${If}) will allow you to execute NSIS code accordingly. -Stu |
|
|
|
|
|
#6 |
|
Senior Member
|
this is the code I used with the previous functions:
code: the problem is that the ExitFunction is loaded before the user can even click on a button. Remember that I am trying to activate the buttons on the final page of the installer, which I couldn't find a page name for it, and hence I used "InstFiles". |
|
|
|
|
|
#7 |
|
Senior Member
|
ok, after almost four years, I attempt to do it again :P
is it possible to make clickable the button which in this screenshot is called "enrera"? http://www.flickr.com/photos/mai9/5184179946/ because I am not sure if what the plugin ButtonEvent is made for this purpose. Thanks |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Why are you calling ExitFunction on page leave? Try not calling it.
Stu |
|
|
|
|
|
#9 |
|
Senior Member
|
I was trying to use it because on Feb 22 you said:
$R0 in your leave function will be 3 if your button is pressed or -1 otherwise. A simple StrCmp (or ${If}) will allow you to execute NSIS code accordingly. I have one other question, if I want to use the button called "enrera" in the screenshot, do I have to reshack edit the UI? |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Ah I see. You could try using ButtonEvent on both. Why do you need to edit the UI? If the button is already there you just need to enable it and show it (if it is hidden).
Stu |
|
|
|
|
|
#11 | |
|
Senior Member
|
Quote:
Next. What does it mean to "use ButtonEvent on both" which both? I don't understand what "both" are you refering to. Also, how to use ButtonEvent on them? Do you mean both buttons? The close button and the one I am interested? I am using the default UI. So, what I have is this page with the leave function and the grey button I want to use. code: I am trying to read the examples, but I get lost easily. So, what I have to do is activate the grey button and put the ButtonEvent code somewhere so I can compare $R0 on the leave function and if it's 3 then use the code I want for that button. Now, if you can help me a little bit further... thanks |
|
|
|
|
|
|
#12 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Yes try on both buttons. I understand what you are trying to do by using a leave function but you don't have to do it that way. You can just use callbacks on each button instead via ButtonEvent.
Stu |
|
|
|
|
|
#13 |
|
Senior Member
|
how can I use a callback on the grey button? I still don't know how to make that button active.
|
|
|
|
|
|
#14 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Get the correct control id and use that (it will be 1, 2 or 3). To make it active use EnableWindow and if necessary ShowWindow.
Stu |
|
|
|
|
|
#15 |
|
Senior Member
|
Ok, I am finally seeing the light
![]() I made this function to see which button is pressed at the end: code: But I can't get the "back" button to be active when the installer has finished. This code makes it active while installing, but it turns grey again when it's finished. code: This function is called in the instfiles page: code: |
|
|
|
|
|
#16 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I have tried and all I can suggest is you add another button (i.e. ID of 4) over the top of the Back button with Resource Hacker and only show it on the InstFiles page. For the previous and next pages you will need to hide the button again (add a Show functions for both).
I.e. Stucode: |
|
|
|
|
|
#17 | |
|
Senior Member
|
Quote:
I am not using "SomeOtherPage". |
|
|
|
|
|
|
#18 |
|
Senior Member
|
ok, thanks for trying. I'll see what I can do.
|
|
|
|
|
|
#19 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If you need that behaviour then you will have to enable the button in your last section (or add another section at the end specially). As for adding in the last page, well that was just for an example.
Stu |
|
|
|
|
|
#20 |
|
Senior Member
|
ok thanks. I see how this goes.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|