Old 26th April 2004, 02:09   #1
gmellor
Junior Member
 
Join Date: Apr 2004
Posts: 4
MUI InstallOptions NOTIFY

Hi all

I'm using MUI and InstallOptions and have a custom page which gets options from the user, such as server transport (HTTP, HTTPS) and port (80, 443).

I want the state of the "port" Text field to change automatically when the user changes the "transport" DropList.

So, I have a custom page with entry and exit functions defined:

Page custom GetProperties CheckProperties

Then, function "GetProperties" displays the InstallOptions widgets:

!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"

and reads values off the page:

!insertmacro MUI_INSTALLOPTIONS_READ $TRANSPORT
!insertmacro MUI_INSTALLOPTIONS_READ $PORT

On the ini page, the transport DropList has "FLAGS=NOTIFY".

Now, function "CheckProperties" checks to see if it was the transport field that changed. If so, it reads its value:

!insertmacro MUI_INSTALLOPTIONS_READ $0 "ioA.ini" "Field 8" "State"

Then, if the state is "HTTP" it writes "80" to the port field:

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "Field 10" "State" "80"

And if the state is "HTTPS", it writes "443" to the port field.

It then executes an Abort to return to the page.

This all works OK except that the state on the page is not changed... after changing the transport DropList to "HTTPS", the port Text field still contains "80". Id would *really* like it so display "443" at this point!

I hope I have explained this clearly. I can of course post the entire code if necessary. Looking forward to your help.
gmellor is offline   Reply With Quote
Old 26th April 2004, 09:26   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Use SendMessage with WM_SETTEXT and a string message (STR: prefix).
Joost Verburg is offline   Reply With Quote
Old 27th April 2004, 01:32   #3
gmellor
Junior Member
 
Join Date: Apr 2004
Posts: 4
Thanks for your help. That led to me find this macro which works nicely:

!insertmacro MUI_INNERDIALOG_TEXT $1 "443"
gmellor is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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