Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 18th February 2013, 17:50   #1
freecorvette
Junior Member
 
Join Date: Feb 2013
Posts: 2
Automatically execute NSIS custom page without requiring the user to click "Next"

Background: I'm looking for a way to disable the "Finish" button on the last page, immediately after the user presses on the button. However, it seems that NSIS takes the mouse down event and keeps the button pressed while executing the "leave" function, so it's not possible to update the button there.

So I thought I would duplicate the final page with another custom page that has the Finish button disabled, so that when the user clicks on the original "Finish" button he is taken to the second page which is identical with the first page, except the Finish button is disabled. This part worked fine.

However, I'm looking for a way to make the page execution jump directly to the "leave" function, after the "show" function. I tried calling the relevant code from the "show" function, I tried to simulate a click on the "Finish" button, but with no luck.

Any advices? Thanks!
freecorvette is offline   Reply With Quote
Old 18th February 2013, 21:00   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
I don't know how to accomplish what you're asking, but I get the feeling that there may be a much simpler and less hacky way to accomplish what you want. Could you describe why you want your Finish button to behave in a broken way?
MSG is offline   Reply With Quote
Old 19th February 2013, 14:11   #3
freecorvette
Junior Member
 
Join Date: Feb 2013
Posts: 2
On the last page of my installer, there is an option to close several running applications. For marketing reasons, this option needs to stay on the last screen and I cannot move it to an earlier page.

Several tasks can only be performed after the running applications are closed, therefore after pressing the Finish button on the last screen, the installer freezes for a few seconds, while performing these tasks.

I need a way to prevent the user from thinking that pressing the Finish button had no effect (and from clicking the button repeatedly in a hope that that would help) -- either by disabling the button, or by hiding it, or by adding a loader on the page, a message etc. The problem though is that after pressing a button on a custom page it doesn't seem possible to update the page's UI until the page tasks are finalized.
freecorvette is offline   Reply With Quote
Old 20th February 2013, 08:59   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
I suggest you use the banner plugin in the finish page's leave function. This will give a proper popup telling the user the installer is closing open applications. The banner plugin is a standard NSIS plugin, you'll have it if you did a full install.
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
click, custom, nsis, page, simulate

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