Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is no perfect solution to this other than writing your own plugin that hosts IE or something like that.</p> <p>A RichEdit textbox is supposed to support links like that but I never got it working 100%, you might try to play with the RTF data some more.</p> <p>If your target is XP+ you can use the SysLink control. If you search the NSIS forum you will see that there are some issues with it and SetCtlColors but it seems to work fine in a nsDialogs page on Win7.</p> <pre><code>!include nsDialogs.nsh !define /math EM_SETBKGNDCOLOR ${WM_USER} + 67 !define /math EM_GETTEXTRANGE ${WM_USER} + 75 !define /math EM_AUTOURLDETECT ${WM_USER} + 91 !define /math EM_SETTEXTEX ${WM_USER} + 97 !define EM_SETEVENTMASK 0x0445 !define ES_NOOLEDRAGDROP 8 !define ENM_LINK 0x4000000 !define EN_LINK 0x70B !define NM_CLICK -2 !define NM_RETURN -4 XPStyle On ; Required by syslink (ComCtl v6) Page Custom mypage mypageleave var syslink Function mypage nsDialogs::Create 1018 pop $0 nsDialogs::CreateControl RichEdit20A ${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${ES_READONLY}|${ES_NOOLEDRAGDROP} ${WS_EX_NOPARENTNOTIFY} 10u 10u 80% 10u '' pop $0 System::Call user32::GetSysColor(i15)i.r1 SendMessage $0 ${EM_SETBKGNDCOLOR} 0 $1 SendMessage $0 ${EM_AUTOURLDETECT} 1 0 SendMessage $0 ${EM_SETEVENTMASK} 0 ${ENM_LINK} System::Call *(i0,i0)i.r1 ;//blogs.msdn.com/b/murrays/archive/2009/09/24/richedit-friendly-name-hyperlinks.aspx# but could not get it to fully work? SendMessage $0 ${EM_SETTEXTEX} $1 'STR:{\rtf1{\field{\*\fldinst{HYPERLINK "http://example.org"}}{\fldresult{Richedit}}} says hello}' System::Free $1 ${NSD_OnNotify} $0 onrichclick nsDialogs::CreateControl SysLink ${WS_CHILD}|${WS_VISIBLE}|${WS_TABSTOP} 0 10u 30u -20u 10u `Hello from &lt;A&gt;SysLink&lt;/A&gt;...` pop $syslink ${NSD_OnNotify} $syslink onsyslinkclick nsDialogs::Show FunctionEnd Function mypageleave System::Call 'user32::DestroyWindow(i $syslink)' FunctionEnd Function onrichclick Pop $0 Pop $1 Pop $2 ${If} $1 = ${EN_LINK} System::Call "*$2(i,i,i,i.r1,i,i,i.r2,i.r3)" ${If} $3 &gt;= 0 ; Is it a CHARRANGE we can work with? ${If} $1 = ${WM_LBUTTONDOWN} IntOp $1 $3 - $2 ; length IntOp $1 $1 + 1 ; \0 System::Call '*(ir2,ir3,i,i,&amp;t$1)i.r1' ; TEXTRANGE + align + string IntOp $2 $1 + 16 System::Call '*$1(i,i,ir2)' SendMessage $0 ${EM_GETTEXTRANGE} 0 $1 System::Call "*$2(&amp;t999.r2)" ExecShell open $2 System::Free $1 ${EndIf} ${EndIf} ${EndIf} FunctionEnd Function onsyslinkclick Pop $0 Pop $1 Pop $2 ${If} $0 = $syslink ${If} $1 = ${NM_CLICK} ${OrIf} $1 = ${NM_RETURN} System::Call `*$2(i,i,i,i,i.r3)` ${If} $3 == 0 ; link index ; This could probably be changed to extract the link from &lt;A href="foo"&gt;...&lt;/A&gt; in the syslink ExecShell open `http://example.com/` ${EndIf} ${EndIf} ${EndIf} FunctionEnd </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload