API:StaticPopup OnClick

simulate "button pressed" on Popup frame
StaticPopup_OnClick(Popup name, button number);
== Parameters ==
=== Arguments ===
Popup name
 don't know all Popup frame names, but you can get them with StaticPopup_Visible
Button number
 "OK" button is 1, "CANCEL" button is 2
=== Returns ===
nothing
== Example code ==
 local invitepopup = StaticPopup_Visible("PARTY_INVITE")
	if invitepopup == "StaticPopup1" then
		StaticPopup_OnClick(StaticPopup1, 1);
	end;
	if invitepopup == "StaticPopup2" then
		StaticPopup_OnClick(StaticPopup2, 1);
	end;
	if invitepopup == "StaticPopup3" then
		StaticPopup_OnClick(StaticPopup3, 1);
	end;
	if invitepopup == "StaticPopup4" then
		StaticPopup_OnClick(StaticPopup4, 1);
	end;
this example will accept party request, but not directly - it's like if you press "ok" in request frame
== Related Functions ==
* StaticPopup_Visible
Category:Functions