Wikia

WoWWiki

API Button Click

Talk0
98,541pages on
this wiki

Clicks a button.

MyButton:Click(virtual mouse button)

Arguments

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

local f = CreateFrame("Button")
f:SetScript("OnClick", function(self, arg1)
    print(arg1)
end)
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

  • This does not work on secure buttons.
Advertisement | Your ad here

Photos

Add a Photo
62,116photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki