I thought it's better to post here again so that it doesn't get lost in the "Ask for Help" section.
Important point is, the associated variable of the control must start with URL in order to work.
Gui, Margin, 5, 5 Gui, Add, Text, xm ym, Multiple URLs in one GUI Gui, Add, Text, xp+8 yp+25 cBlue gLink1 v[color=red]URL[/color]_Link1, www.autohotkey.com Gui, Add, Text, xp yp+20 cBlue gLink2 v[color=red]URL[/color]_Link2, de.autohotkey.com Gui, Add, Text, xp yp+20 cBlue gLink3 v[color=red]URL[/color]_Link3, www.google.com Gui, Add, Text, xp yp+20 cBlue gLink4 v[color=red]URL[/color]_Link4, www.msdn.com Gui, Font, norm Gui, Show,, URL ; Retrieve scripts PID Process, Exist pid_this := ErrorLevel ; Retrieve unique ID number (HWND/handle) WinGet, hw_gui, ID, ahk_class AutoHotkeyGUI ahk_pid %pid_this% ; Call "HandleMessage" when script receives WM_SETCURSOR message WM_SETCURSOR = 0x20 OnMessage(WM_SETCURSOR, "HandleMessage") ; Call "HandleMessage" when script receives WM_MOUSEMOVE message WM_MOUSEMOVE = 0x200 OnMessage(WM_MOUSEMOVE, "HandleMessage") Return GuiClose: ExitApp ;######## End of GUI ########################################################### ;######## GUI glabels ########################################################## Link1: Run, http://www.autohotkey.com/forum Return Link2: Run, http://de.autohotkey.com Return Link3: Run, http://www.google.com Return Link4: Run, http://www.msdn.com Return ;######## End Of GUI glabels ################################################### ;######## Function ############################################################# HandleMessage(p_w, p_l, p_m, p_hw) { global WM_SETCURSOR, WM_MOUSEMOVE, static URL_hover, h_cursor_hand, h_old_cursor, CtrlIsURL, LastCtrl If (p_m = WM_SETCURSOR) { If URL_hover Return, true } Else If (p_m = WM_MOUSEMOVE) { ; Mouse cursor hovers URL text control StringLeft, CtrlIsURL, A_GuiControl, 3 If (CtrlIsURL = "URL") { If URL_hover= { Gui, Font, cBlue underline GuiControl, Font, %A_GuiControl% LastCtrl = %A_GuiControl% h_cursor_hand := DllCall("LoadCursor", "uint", 0, "uint", 32649) URL_hover := true } h_old_cursor := DllCall("SetCursor", "uint", h_cursor_hand) } ; Mouse cursor doesn't hover URL text control Else { If URL_hover { Gui, Font, norm cBlue GuiControl, Font, %LastCtrl% DllCall("SetCursor", "uint", h_old_cursor) URL_hover= } } } } ;######## End Of Functions #####################################################
26.02.2007
+ Added support for more than one URL.