This is a script that brainsucker made for me, but it isn't working quite right.
; OpenFileName defenition
!define stOPENFILENAME '(&l4, i, i 0, i, i 0, i 0, i 0, t, i \
${NSIS_MAX_STRLEN}, t, i ${NSIS_MAX_STRLEN}, t, t, i, \
&i2, &i2, t, i 0, i 0, i 0) i'
; Prepare filter sting
System::Call '*(&t19 "Zip files", &t6 "*.zip", &t16 \
"Zip files", &t4 "*.zip", &i1 0) i.r0'
; Prepare OpenFileName structure with other options
System::Call '*${stOPENFILENAME}(, $HWNDPARENT,, r0,,,,"",,"",, \
i 0, "Select zip file to install", 0xA01800,,,,,,) .r1'
; OpenFileName Dialog
System::Call 'comdlg32::GetOpenFileNameA(i r1) i .r2'
; You could check r2 for zero value - this will indicate
; the user pressed the cancel button
; Retrieve selected file path
System::Call '*$1${stOPENFILENAME}(,,,,,,,.r3)'
; just a demo
MessageBox MB_OK 'Result $2, Filename "$3"'
; Free used memory
System::Free $1
System::Free $0
The "*.zip" bit that is meant to show only zip files is not working - *.* show instead.
Can anyone fix this for me?
Thanks
-Stu