WoWBench/FAQ: Difference between revisions

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>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>


: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>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|&gt; dofile("myluacode.lua")}}
::<code>&gt; 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: {{code|lua wowbench.lua '''-f''' MyAddOn}} 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.)
* 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.)




Anonymous user