WoWBench/Getting started: Difference between revisions

upgraded code template
(demoted headings)
(upgraded code template)
Line 11: Line 11:
Getting up and running with WoWBench is really only a matter of starting it, e.g.:
Getting up and running with WoWBench is really only a matter of starting it, e.g.:


:{{Code|C:\wowbench>'''lua wowbench.lua -f'''}}
:<code>C:\wowbench>'''lua wowbench.lua -f'''</code>


The "-f" switch probably isn't what you want to use for each startup, but if you give ''no'' [[#Command line arguments|command line arguments]], it will show parameter help rather than starting up.
The "-f" switch probably isn't what you want to use for each startup, but if you give ''no'' [[#Command line arguments|command line arguments]], it will show parameter help rather than starting up.
Line 96: Line 96:
<div style="margin: 0 0 1em 2%;">
<div style="margin: 0 0 1em 2%;">


;Usage:{{code|lua50 wowbench.lua [<parameters>] addon1 [addon2 ...]}}
;Usage:<code>lua50 wowbench.lua [<parameters>] addon1 [addon2 ...]</code>


Parameters:
Parameters:
Line 115: Line 115:
Easy:
Easy:


:{{Code|lua50 wowbench.lua ct_raidassist ace archud}}
:<code>lua50 wowbench.lua ct_raidassist ace archud</code>




Line 132: Line 132:


* Call functions in your AddOn directly from the prompt:
* Call functions in your AddOn directly from the prompt:
:: {{Code|MyAddOn_DoSomething("someParameter")}}
:: <code>MyAddOn_DoSomething("someParameter")</code>
* Make Alice, Bob or Charles (the default player characters) say something:  
* Make Alice, Bob or Charles (the default player characters) say something:  
:: {{Code|say Alice Help! Help! The horrible Murloc Warrior is hitting me!}}
:: <code>say Alice Help! Help! The horrible Murloc Warrior is hitting me!</code>
* Fire an event:  
* Fire an event:  
:: {{Code|fire DUEL_REQUESTED Charles}}
:: <code>fire DUEL_REQUESTED Charles</code>
* Run a slash command:  
* Run a slash command:  
:: {{Code|/myaddon dosomething}}
:: <code>/myaddon dosomething</code>
* Look at the frame that popped up:  
* Look at the frame that popped up:  
:: {{Code|look MyAddOnMainFrame}}
:: <code>look MyAddOnMainFrame</code>
* Click a button in it:  
* Click a button in it:  
:: {{Code|click MyAddOnMainFrameIWinButton}}
:: <code>click MyAddOnMainFrameIWinButton</code>


=== How to interact with things ===
=== How to interact with things ===
Line 190: Line 190:
</div><div style="clear:left;"></div>
</div><div style="clear:left;"></div>


This just a simple <tt>&lt;OnEnter&gt;</tt> trigger in world.xml, in {{code|&lt;Object name&#x3d;"Signpost"&gt;}}, which demonstrates that you can more or less define the world to behave exactly the way you like it to. A more meaningful implementation of OnEnter in objects is probably to trigger the GameTooltip object to show:
This just a simple <tt>&lt;OnEnter&gt;</tt> trigger in world.xml, in <code>&lt;Object name&#x3d;"Signpost"&gt;</code>, which demonstrates that you can more or less define the world to behave exactly the way you like it to. A more meaningful implementation of OnEnter in objects is probably to trigger the GameTooltip object to show:




Line 227: Line 227:




To see ''everything'' on-screen (well, nearly), you can {{code|look UIParent}}, but ''that'' dump, we're not going to show here :-)
To see ''everything'' on-screen (well, nearly), you can <code>look UIParent</code>, but ''that'' dump, we're not going to show here :-)




Anonymous user