daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Dec 14th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Page custom mycustompage
  2.  
  3. !include nsDialogs.nsh
  4. !include TextFunc.nsh
  5.  
  6. Function mycustompage
  7. nsDialogs::Create 1018
  8. Pop $0
  9.  
  10. ; I don't have a list of things so I generate one on the fly for this example:
  11. !tempfile MYLIST
  12. !appendfile "${MYLIST}" "Foo$\r"
  13. !appendfile "${MYLIST}" "Bar$\r$\n"
  14. !appendfile "${MYLIST}" "Baz$\n"
  15. File "/oname=$pluginsdir\thelist.txt" "${MYLIST}" ; include list in installer
  16. !delfile "${MYLIST}"
  17.  
  18. ${NSD_CreateDropList} 10u 10u 50% 100% ""
  19. Pop $0
  20.  
  21. FileOpen $1 "$pluginsdir\thelist.txt" r
  22. loop:
  23.     FileRead $1 $2
  24.     IfErrors endloop
  25.     ${TrimNewLines} $2 $2
  26.     StrCmp $2 "" loop ; skip empty line
  27.     ${NSD_CB_AddString} $0 $2
  28.     goto loop
  29. endloop:
  30.  
  31. nsDialogs::Show
  32. FunctionEnd
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top