Archive: Scripting Help, Validation


Scripting Help, Validation
Hi, I'm a complete n00b with NSIS and I've only just began using it. I'm adding my own custom page so the user can locate the directory of a previously installed application.

I was just making headway in validating information inputted into the DirRequest control, but having to validate the path the user had given upon leaving the page (i.e. when the user clicked 'Next'). Then I noticed how the built-in 'MUI_PAGE_DIRECTORY' page/macro worked differently. On this page when you type your install destination the path validates as you type, and once the path is valid you are able to click 'Install'. I thought to myself "Yeah, that's more user friendly!" and so looked at the documentation on InstallOptions2. Here I found there is a NOTIFY flag for certain controls...

Taken from Documentation -
"Used by "Button", "Link", "CheckBox", "RadioButton", "ListBox" and "DropList" controls. Causes InstallOptions to call your NSIS custom page validation/leave function whenever the control's selection changes."

So now I'm under the impression that there'd be no way for me to call my validation function "onChange" and I'm left with having to validate when the user leaves the page since my control isn't included in the list of 'controls that support the notify flag'.

So my question is: does anybody know if there's a way for the 'DirRequest' control to call my own custom function upon change (typing)?


Maybe InstallOptionsEx has this feature...


Thanks for the reply! It look promising, I'll post my findings when I give it a try.