Menu

#302 Fix ${StrClb} function in StrFunc.nsh

3.x Stable
closed
nobody
None
5
2021-05-03
2021-02-25
iglezz
No

Using CF_UNICODETEXT clipboard format for Unicode installers
Returns empty string if clipboard is empty

1 Attachments

Discussion

  • iglezz

    iglezz - 2021-02-25

    Sample script to reproduce issues with the original StrClb func

    Unicode true
    RequestExecutionLevel user
    
    !include StrFunc.nsh
    ${StrClb}
    
    Function .onInit
    
    StrCpy $0 "Chào thế giới!" ;String with any Unicode characters
    ${StrClb} $1 $0 ">"
    MessageBox MB_OK "Step 1.$\nSent to clipboard unicode string:$\n$\n----------$\n$0$\n----------$\n$\nCheck the contents of the clipboard, then press OK."
    
    ${StrClb} $0 "" ""
    MessageBox MB_OK "Step 2.$\nClipboard cleared.$\nCopy the new text to the clipboard, then press OK."
    
    ${StrClb} $0 "" "<"
    MessageBox MB_OK "Step 3.$\nGet from clipboard:$\n$\n----------$\n$0$\n----------"
    Quit
    
    FunctionEnd
    
    Section
    SectionEnd
    
     
  • Anders

    Anders - 2021-05-03
    • status: open --> closed
     

Log in to post a comment.