Skip to content
⌘ NSIS Forum Archive

User menu from file list

21 posts

zetrozet#

User menu from file list

How from file list create user menu for selection (of one file). Number not even name file in user destiny directory is not known ahead
Anders#
Your English is hard to understand.

Do you mean a (right click) menu or a control like a listbox where you can display some filenames?
Anders#
You can create custom pages with the nsDialogs plugin. To find files you should read about the FindFirst instruction or the Locate helper macro...
zetrozet#
Picture NSIS140808a.PNG is variable "$seznambat" - filelist from directory. [IMG]http://test.zetrozet******images/NSIS140808a.png[/IMG]

Picture NSIS140808b.png is my test display "$seznambat" variable in nsDialogs. [IMG]http://test.zetrozet******images/NSIS140808b.png[/IMG]
I don't know display all lines variables for selection.
zetrozet#
Jest moznosc nastepnu korespondencju prowadzic w jezyku polskim. Moj przeklad z czeszczyzny bedzie zrozumialy i przy mylnom szyku wyrazow w zdaniu.
zetrozet#
Picture NSIS140808a.PNG is variable "$seznambat" - filelist from directory - [IMG]http://test.zetrozet******images/NSIS140808a.png[/IMG].

Picture NSIS140808b.png is my test display "$seznambat" variable in nsDialogs -[IMG]http://test.zetrozet******images/NSIS140808b.png[/IMG].
I don't know display all lines variables for selection.
zetrozet#
System always nesting to the URL asterisk, so that isn't final picture accessible. URL is now "http://test.zetrozet******images/NSIS_MyErr.htm".

Presuming too, do you HTML-translator art English better, than I, therefore implore one's help with problems clerkish on web.

URL =http://test.zetrozet******images/NSIS_MyErr.htm
Anders#
Try posting without the http:// part (New forum users are not allowed to post links for some reason)
zetrozet#
While using example nsDialogs command "${NSD_SetUserData}" report in makensis version 2.46 error. Command "${NSD_CreateRadioButton}" used in script once, is transfer perfectlly:


!include "nsDialogs.nsh"
!include "winmessages.nsh"
!include "logiclib.nsh"
OutFile "G:\ico_pif.odh\test3.exe"
Page Custom pre
var dialog
var hwnd
Function pre
nsDialogs::Create 1018
Pop $dialog
${NSD_CreateRadioButton} 0 0 40% 6% "Group 1, Radio 1"
Pop $hwnd
${NSD_AddStyle} $hwnd ${WS_GROUP}
${NSD_SetUserData} $hwnd "Group1Radio1"
${NSD_OnClick} $hwnd RadioClick
${NSD_CreateRadioButton} 0 12% 40% 6% "Group 1, Radio 2"
Pop $hwnd
${NSD_SetUserData} $hwnd "Group1Radio2"
${NSD_OnClick} $hwnd RadioClick
nsDialogs::Show
FunctionEnd
Function RadioClick
Pop $hwnd
${NSD_GetUserData} $hwnd $0
${If} $0 == "Group1Radio1"
MessageBox MB_OK "onClick:Group1Radio1"
${ElseIf} $0 == "Group1Radio2"
MessageBox MB_OK "onClick:Group1Radio2"
${EndIf}
FunctionEnd
Section ""
SectionEnd
Anders#
Where did you get ${NSD_SetUserData} from?

Use

nsDialogs::SetUserData $hwnd "Group1Radio1"
and

nsDialogs::GetUserData $hwnd
Pop $0
zetrozet#
My question is - how from nsDialogs::Show set buttons "Back"(Zpet) and "Cancel"(Storno) permanently active. Screen is on "test dot zetrozet dot biz / images / NSIS_MyErr.htm".
zetrozet#
When use this command only once (for example with "$hwndparent 3") is active only first button.
Third button is active only in case, when use this command threefold (with "$hwndparent 1", "$hwndparent 2" and "$hwndparent 3" too).
zetrozet#
When use

GetDlgItem $0 $hwndparent 1 # 1,2,3
EnableWindow $0 1
GetDlgItem $0 $hwndparent 2 # 1,2,3
EnableWindow $0 0
GetDlgItem $0 $hwndparent 3 # 1,2,3
EnableWindow $0 1

is active first and second button.
zetrozet#
Windows 7/32 have this bug report:
--------------------------------------------------------------------------
Podpis problému:
Název události problému: APPCRASH
Název aplikace: US_LNK_PIF.EXE
Verze aplikace: 2014.8.13.1
Časové razítko aplikace: 4b1ae3cc
Název chybného modulu: nsDialogs.dll
Verze chybného modulu: 0.0.0.0
Časové razítko chybného modulu: 4b1ae3a8
Kód výjimky: c0000005
Posun výjimky: 000015ec
Verze operačního systému: 6.1.7601.2.1.0.256.48
ID národního prostředí: 1029
Další informace 1: 0a9e
Další informace 2: 0a9e372d3b4ad19135b953a78882e789
Další informace 3: 0a9e
Další informace 4: 0a9e372d3b4ad19135b953a78882e789

Přečtěte si prohlášení o zásadách ochrany osobních údajů online:
http://go.microsoft.com/fwlink/?link...8&clcid=0x0405

Pokud není k dispozici Prohlášení o zásadách ochrany osobních údajů online, přečtěte si toto prohlášení offline:
C:\Windows\system32\cs-CZ\erofflps.txt
--------------------------------
after press BackButton defined in these program sequence:

GetDlgItem $ButtonZpet $hwndparent 1 # 1,2,3
EnableWindow $ButtonZpet 1
GetDlgItem $ButtonDale $hwndparent 2 # 1,2,3
EnableWindow $ButtonDale 0
GetDlgItem $ButtonExit $hwndparent 3 # 1,2,3
EnableWindow $ButtonExit 1
${NSD_OnBack} .OnVerifyInstDir
nsDialogs::OnClick $ButtonDale nsDialogsVybrany
nsDialogs::Show