Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:MACRO click
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{macroapi}} __NOTOC__ Simulate a mouse click on a frame of type ''Button''. /click options ButtonObj MouseButton Down == Aliases == :''none'' ==Arguments== ;options : See [[Making a macro]] for instructions on how to properly use ''options''. ;ButtonObj : The button to click. If the frame's type is not ''Button'', this will silently fail. ;MouseButton : The button you wish to simulate the click with. Accepts any value (LeftButton is the default). [[API_GetMouseButtonClicked|GetMouseButtonClicked]]() will return this value. ;Down : Simulates a down-click. A value of "true" or "1" will cause a down-click. Any other value will not. == Notes == * This macro calls <code>[[API_Button_Click|ButtonObj:Click]](''MouseButton'', ''Down'')</code> and triggers its [[UIHANDLER_OnClick|OnClick]], [[UIHANDLER_PreClick|PreClick]], and [[UIHANDLER_PostClick|PostClick]] scripts. * The button must be clickable (<code>[[API_Button_EnableMouse|ButtonObj:EnableMouse]](true)</code>) and enabled (<code>[[API_Button_Enable|ButtonObj:Enable]]()</code>). * Unlike physically clicking the mouse button, there is no up-click with a down-click and no down-click with an up-click and you can't hold the virtual ''MouseButton'' down. * This does not trigger the button's [[UIHANDLER_OnMouseDown|OnMouseDown]] or [[UIHANDLER_OnMouseUp|OnMouseUp]] scripts. * The macro system prevents infinite loops by not allowing the macro to click itself or click another macro that will return the click (no bouncing reflects here). * The same syntax and options as [[MACRO_cast|cast]] can also be used with '''click'''. E.g. <code>/click [btn:1] ActionButton1; ActionButton2</code>, <code>/click [target=mouseover,exists] ActionButton1; ActionButton2</code>, etc.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Macroapi
(
edit
)
Template:Macronav
(
edit
)
Template:Tocright
(
edit
)