Skip to content
⌘ NSIS Forum Archive

How to do something automatically after showing custom page?

5 posts

kleinstein#

How to do something automatically after showing custom page?

i have a custom page.
and i want to do something after showing this custom page.

for example:



;...

Page custom TestPage TestPageLeave

;...


Function TestPage

nsDialogs::Create 1018 # why 1018 ?

; create some controls ...

nsDialogs::Show

Call doSomething ; i want to call this fucntion after showing this custom page! How?

FunctionEnd
aerDNA#
;...
${NSD_CreateTimer} doSomething 1
nsDialogs::Show
FunctionEnd

Function doSomething
${NSD_KillTimer} doSomething
;...
FunctionEnd
Anders#
Why not just do it before calling nsDialogs::Show? If what you are doing takes a lot of time you are going to lock up the UI anyway
kleinstein#
Originally Posted by aerDNA View Post
;...
${NSD_CreateTimer} doSomething 1
nsDialogs::Show
FunctionEnd

Function doSomething
${NSD_KillTimer} doSomething
;...
FunctionEnd
Thank you!
kleinstein#
Originally Posted by Anders View Post
Why not just do it before calling nsDialogs::Show? If what you are doing takes a lot of time you are going to lock up the UI anyway
Yes, it taks some time. if i do it before, it freeze ui. i do not like that.

and i want to show some text at first and after some time to show the other text at the same dialog.

so..

with ${NSD_CreateTimer} i have solved the problem. thank you.