Run when the mouse clicks a hyperlink in the scrolling message frame or SimpleHTML frame. This script handler is run when the mouse button is released while the mouse cursor is over the same hyperlink text in which the mouse button was pressed.


OnHyperlinkClick(self, "linkData", "link", "button")


  • self - Reference to the widget for which the script was run (frame)
  • linkData - Essential data (linktype:linkdata portion) of the hyperlink (e.g. "quest:982:17") (string)
  • link - Complete hyperlink text (e.g. "|cffffff00|Hquest:982:17|h[Deep Ocean, Vast Sea]|h|r") (string, hyperlink)
  • button - Name of the mouse button responsible for the click action (string)
    • Button4
    • Button5
    • LeftButton
    • MiddleButton
    • RightButton


-- Print information about a clicked hyperlink
local someMessageFrame = WowLuaFrameOutput
someMessageFrame:SetScript("OnHyperlinkClick", function(self, linkData, link, button)
      self:AddMessage(format("You clicked on %s with %s", link, button))