API Button Click

Revision as of 07:01, July 29, 2010 by Egingell (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
102,841pages on
this wiki
Widget API ← Button < Click

Clicks a button.

MyButton:Click(virtual mouse button)

Arguments Edit

virtual mouse button 
String. The mouse button to virtually click the button with. Whatever gets passed here will be used as arg1 in the button's OnClick script handler.

Example Edit

local f = CreateFrame("Button")
f:SetScript("OnClick", function(self, arg1)
f:Click("foo bar") -- will print "foo bar" in the chat frame.
f:Click("blah blah") -- will print "blah blah" in the chat frame.

Notes Edit

  • This does not work on secure buttons.

Around Wikia's network

Random Wiki