Old 6th August 2014, 20:46   #1
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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
zetrozet is offline   Reply With Quote
Old 6th August 2014, 21:04   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
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?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 6th August 2014, 21:22   #3
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
I mean listbox or radiobuttons with displayed filenames.
zetrozet is offline   Reply With Quote
Old 6th August 2014, 21:50   #4
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
Sorry Russian is better, but have not keyboard with Cyrillic alphabet.
zetrozet is offline   Reply With Quote
Old 6th August 2014, 22:28   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
You can create custom pages with the nsDialogs plugin. To find files you should read about the FindFirst instruction or the Locate helper macro...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 8th August 2014, 11:52   #6
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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 is offline   Reply With Quote
Old 8th August 2014, 14:21   #7
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
Jest moznosc nastepnu korespondencju prowadzic w jezyku polskim. Moj przeklad z czeszczyzny bedzie zrozumialy i przy mylnom szyku wyrazow w zdaniu.
zetrozet is offline   Reply With Quote
Old 9th August 2014, 10:12   #8
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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 is offline   Reply With Quote
Old 10th August 2014, 12:11   #9
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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
zetrozet is offline   Reply With Quote
Old 10th August 2014, 14:10   #10
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Try posting without the http:// part (New forum users are not allowed to post links for some reason)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 10th August 2014, 18:34   #11
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
test dot zetrozet dot biz/images/NSIS_MyErr.htm
zetrozet is offline   Reply With Quote
Old 11th August 2014, 14:44   #12
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
While using example nsDialogs command "${NSD_SetUserData}" report in makensis version 2.46 error. Command "${NSD_CreateRadioButton}" used in script once, is transfer perfectlly:

code:

!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

zetrozet is offline   Reply With Quote
Old 11th August 2014, 16:41   #13
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Where did you get ${NSD_SetUserData} from?

Use

Quote:
nsDialogs::SetUserData $hwnd "Group1Radio1"
and

Quote:
nsDialogs::GetUserData $hwnd
Pop $0

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 12th August 2014, 06:42   #14
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
No I. That is example made public on http://nsis.sf.net.
zetrozet is offline   Reply With Quote
Old 12th August 2014, 09:05   #15
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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 is offline   Reply With Quote
Old 12th August 2014, 10:53   #16
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
If you mean enabled you can use:
Quote:
GetDlgItem $0 $hwndparent 1 # 1,2,3
EnableWindow $0 1

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 12th August 2014, 12:24   #17
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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 is offline   Reply With Quote
Old 12th August 2014, 12:32   #18
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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 is offline   Reply With Quote
Old 13th August 2014, 18:47   #19
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
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
zetrozet is offline   Reply With Quote
Old 13th August 2014, 19:09   #20
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
Is this the first page? You cannot go back if you are on the first page...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 23rd August 2014, 16:18   #21
zetrozet
Junior Member
 
Join Date: Aug 2014
Posts: 15
No, this is second page. First page is "Page directory".
zetrozet 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