upgraded code template
(demoted headings) |
(upgraded code template) |
||
| Line 87: | Line 87: | ||
:Whatever you want to do. | :Whatever you want to do. | ||
:* Call functions in your AddOn directly from the prompt: | :* Call functions in your AddOn directly from the prompt: | ||
::: | ::: <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> | ||
:* Fire an event: | :* Fire an event: | ||
::: | ::: <code>fire DUEL_REQUESTED Charles</code> | ||
:* Run a slash command: | :* Run a slash command: | ||
::: | ::: <code>/myaddon dosomething</code> | ||
:* Look at the frame that popped up: | :* Look at the frame that popped up: | ||
::: | ::: <code>look MyAddOnMainFrame</code> | ||
:* Click a button in it: | :* Click a button in it: | ||
::: | ::: <code>click MyAddOnMainFrameIWinButton</code> | ||
:And much more :-) | :And much more :-) | ||
| Line 106: | Line 106: | ||
:* You can automatically run wowbench command line scripts by giving names of .txt files on the command line, e.g.: | :* You can automatically run wowbench command line scripts by giving names of .txt files on the command line, e.g.: | ||
:: | ::<code>wowbench MyAddon script.txt</code> | ||
:* You can load and run Lua code on demand from the command prompt (or from inside a script file): | :* You can load and run Lua code on demand from the command prompt (or from inside a script file): | ||
:: | ::<code>> dofile("myluacode.lua")</code> | ||
| Line 119: | Line 119: | ||
{{faqq}}I'm getting ''very'' weird errors / It seems like some stuff isn't even loading like it should? | {{faqq}}I'm getting ''very'' weird errors / It seems like some stuff isn't even loading like it should? | ||
* Try the "-f" switch: | * Try the "-f" switch: <code>lua wowbench.lua '''-f''' MyAddOn</code> to force a re-parse of .toc and .xml files in case the dependencies haven't been updated properly. (WoWBench precompiles .xml files into .xml.lua files to speed subsequent loads up.) | ||