Новый участник
Сообщения: 17
Благодарности: 3
|
Профиль
|
Отправить PM
| Цитировать
PHP код:
# Copyright CatsSoft
# ...:: INFO ::... #
Name "iTEST" OutFile "iTEST.exe" InstallDir "$TEMP\iTEST"
# ...:: COMPRESS ::... #
SetCompressor /SOLID /FINAL lzma
# ...:: RUN ::... #
RequestExecutionLevel user
# ...:: SHOW / HIDE ::... #
ShowInstDetails nevershow ShowUninstDetails NeverShow
# ...:: INCLUDES ::... #
!include "MUI2.nsh" !include "WinCore.nsh" !include "nsDialogs.nsh" !include "LogicLib.nsh" !include "WinMessages.nsh" !include "FileFunc.nsh"
# ...:: BRANDING ::... #
BrandingText /TRIMRIGHT " "
# ...:: PAGE ::... #
Page custom page1.create Page instfiles
# ...:: LANGUAGES ::... #
!insertmacro MUI_LANGUAGE "English" # first language
# ...:: INIT ::... #
Function .onInit FunctionEnd
# ...:: PAGE 1 ::... #
Function page1.create
# ...:: VARIABLES ::... #
var /GLOBAL Dialog
var /GLOBAL Path.READ
var /GLOBAL PATH.FILE var /GLOBAL Btn_Add
var /GLOBAL Btn_Read
GetDlgItem $0 $HWNDPARENT 1 ShowWindow $0 ${SW_HIDE} GetDlgItem $0 $HWNDPARENT 2 ShowWindow $0 ${SW_HIDE} GetDlgItem $0 $HWNDPARENT 3 ShowWindow $0 ${SW_HIDE} GetDlgItem $0 $HWNDPARENT 1990 ShowWindow $0 ${SW_HIDE} GetDlgItem $0 $HWNDPARENT 1991 ShowWindow $0 ${SW_HIDE} GetDlgItem $0 $HWNDPARENT 1992 ShowWindow $0 ${SW_HIDE}
System::Call "user32::SetWindowPos(i$HWNDPARENT,i,i,i,i 632,i 466,i 0x16)" nsDialogs::Create /NOUNLOAD 1044 Pop $Dialog ${If} $Dialog == error Abort ${EndIf} System::Call "user32::MoveWindow(i$Dialog,i0,i0,i 632,i 466,i0)"
# ...:: PATH FILES ::... #
nsDialogs::CreateControl /NOUNLOAD EDIT 0x40000000|0x10000000|0x04000000|0x00010000|0x00000080 0 2% 5% 79% 15u "" Pop $PATH.FILE
CreateFont $0 "$(^Font)" "12" "100" SendMessage $PATH.FILE ${WM_SETFONT} $0 0
# ...:: BUTTON ADD FILES ::... #
nsDialogs::CreateControl /NOUNLOAD BUTTON 0x40000000|0x10000000|0x04000000|0x00010000 0 82% 5% 65u 15u "" Pop $Btn_Add Strcpy $1 $Btn_Add GetFunctionAddress $3 "on.Click.Add.Files" nsDialogs::onClick /NOUNLOAD $1 $3
SendMessage $Btn_Add '${WM_SETTEXT}' '0' "STR:$(^BrowseBtn)"
# ...:: LOCATION OF READ ::... #
nsDialogs::CreateControl /NOUNLOAD EDIT 0x40000000|0x10000000|0x04000000|0x00010000|0x00000080|0x00000004|0x00200000|0x00100000|0x00000800 0 2% 15% 96% 190u "" # 0x00000100|0x00000200 Pop $PATH.READ
CreateFont $0 "$(^Font)" "12" "100" SendMessage $PATH.READ ${WM_SETFONT} $0 0
# ...:: BUTTON READ ::... #
nsDialogs::CreateControl /NOUNLOAD BUTTON 0x40000000|0x10000000|0x04000000|0x00010000 0 145u 245u 120u 25u "Read Now ..." ; Read Pop $Btn_Read StrCpy $1 $Btn_Read GetFunctionAddress $3 "On.Click.Read.Files" nsDialogs::onClick /NOUNLOAD $1 $3
CreateFont $0 "$(^Font)" "12" "100" SendMessage $Btn_Read 0x0030 $0 0
nsDialogs::Show
FunctionEnd
# ...:: ADD FILES ::... #
Function "on.Click.Add.Files" var /GLOBAL MYFILES nsDialogs::SelectFileDialog /NOUNLOAD "open" "C:\" "Files|*.txt;*.ini;*.pls;*.m3u;*.bat;*.nsi;*.nsh;*.dat;*.htm;*.html;*.css;*.js;*.xml;*.rtf;*.log;*.reg;*.lng;*.data;*.json|*.*" Pop $0 StrCpy $MYFILES "$0" ${NSD_SetText} $PATH.FILE "$MYFILES" FunctionEnd
# ...:: READ FILES ::... #
Function "On.Click.Read.Files" FileOpen $4 "$MYFILES" r loop: FileRead $4 $1 SendMessage $PATH.READ ${EM_REPLACESEL} 0 "STR:$1" IfErrors +1 loop FileClose $4 FunctionEnd
# ...:: SECTION ::... #
Section "Main" SEC01 SectionEnd
# ...:: END PAGE ::... #
Function .onGUIEnd FunctionEnd
|
Отправлено: 13:09, 13-01-2017
| #2078
|