Archive: recover the content of the "space required" and "Space available" labels


recover the content of the "space required" and "Space available" labels
Hello,

do you know if it's possible to recover in two variables, the content of the "space required" and "Space available" labels of the DIRECTORY page?


I had a go but I think the text is set after the page's show function.
This doesn't work:


!include WinMessages.nsh
Page Directory "" show

Function show

FindWindow $R0 "#32770" "" $HWNDPARENT

GetDlgItem $R1 $R0 1023
SendMessage $R1 ${WM_GETTEXT} 0 0 $R1
MessageBox MB_OK $R1

GetDlgItem $R1 $R0 1024
SendMessage $R1 ${WM_GETTEXT} 0 0 $R1
MessageBox MB_OK $R1

FunctionEnd


-Stu

To get the required space you can mimic the internal behavior using SectionGetSize for every selected section. To get the the available space, use this or some other code from the Archive.


Thank you very much, I will test that.


I tested your script Afrow UK, but in the INSTDIR LEAVE cunstom function and indeed, it don't work, it return à 0 value.

On the MSDN web site, I could read:

Windows 2000/XP: Sending a WM_GETTEXT message to a non-text static control, such as a static bitmap or static icon control, does not return a string value. Instead, it returns zero.