WowLua is an in-game Lua scripting environment that includes an interactive Lua interpreter as well as a multi-page script editor. Other features include:
* Syntax coloring, courtesy of krka's spectacular For All Indents and Purposes library
* Sleek buttons, courtesy of Mikk
* When WowLua is running code, it defines a global function print() which directs output to the WowLua window, for convenience. This global is removed when not running from WowLua
* Can open WowLua using /wowlua or /lua. Both of these slash commands will take a lua expression and run it, if provided:
/lua print(14) will open WowLua and print the number 14 to the output window.
Close button now shows unsaved dialog
No longer auto-saves on run (should we add an auto save check box?)
------------------------------------------------------------------------
r16 | Cogwheel-17646 | 2008-04-29 19:23:59 -0700 (Tue, 29 Apr 2008) | 1 line
Delete button works again
Added basic Open functionality (sorry cladhaire... selecting names from a dropdown is still > typing from memory)
Saving a new script asks for a name
Creating a new page shows the unsaved page dialog
------------------------------------------------------------------------
r12 | Cogwheel-17646 | 2008-04-29 13:29:23 -0700 (Tue, 29 Apr 2008) | 4 lines
Run button works
Line numbers are no longer editable
Lock/unlock buttons work
Lock button now shows the lock icon based on the current state (tooltip reflects this)
------------------------------------------------------------------------
r11 | Cladhaire-15704 | 2008-04-29 06:07:26 -0700 (Tue, 29 Apr 2008) | 7 lines
Massive changes
* New button implemented
* Undo button implemented
* Prev/Next buttons implemented, including warnings
* Save (and rename) implemented
Refactored click handler
Delete button creates a new page if you delete the only remaining one
Window title displays name of current page
------------------------------------------------------------------------
r8 | Cogwheel-17646 | 2008-04-28 18:21:25 -0700 (Mon, 28 Apr 2008) | 1 line
Next button correctly removes desaturation from the Previous button
------------------------------------------------------------------------
r7 | Cladhaire-15704 | 2008-04-28 15:41:23 -0700 (Mon, 28 Apr 2008) | 2 lines
Originally posted by Resa1983 Deleted the file, can now load it up again via /lua, however clicking the delete button I get the popup "You have unsaved changes on this page that will be lost if you navigate away from it. Continue?" (which is normal), however on clicking OK still I still get the the same errors:
Code:
[2008/05/09 17:53:33-112-x1]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:411: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:262: in function `Button_OnClick'
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Code:
[2008/05/09 17:53:34-112-x3]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:396: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:433: in function `OnAccept'
Interface\FrameXML\StaticPopup.lua:2675: in function `StaticPopup_OnClick':
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Once I get the first error & decide to close wowlua, I keep getting this error
Code:
[2008/05/09 17:28:02-103-x1]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:582: attempt to index local 'entry' (a nil value)
Interface\FrameXML\ChatFrame.lua:3032: in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2724: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2745: in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>
---
Originally posted by Cogwheel Exit WoW completely and then delete the following file:
World of Warcraft\WTF\Account\<account name>\SavedVariables\WowLua.lua
When you go back into the game it should work.
If the same thing happens again, be sure to let us know. Those error messages indicate that either all the pages got deleted or the UI was on a page that didn't exist anymore (both would be bugs).
This may have happened if you had an older version of WowLua installed previously, in which case you shouldn't see it again.
Deleted the file, can now load it up again via /lua, however clicking the delete button I get the popup "You have unsaved changes on this page that will be lost if you navigate away from it. Continue?" (which is normal), however on clicking OK still I still get the the same errors:
Code:
[2008/05/09 17:53:33-112-x1]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:411: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:262: in function `Button_OnClick'
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Code:
[2008/05/09 17:53:34-112-x3]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:396: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:433: in function `OnAccept'
Interface\FrameXML\StaticPopup.lua:2675: in function `StaticPopup_OnClick':
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Exit WoW completely and then delete the following file:
World of Warcraft\WTF\Account\<account name>\SavedVariables\WowLua.lua
When you go back into the game it should work.
If the same thing happens again, be sure to let us know. Those error messages indicate that either all the pages got deleted or the UI was on a page that didn't exist anymore (both would be bugs).
This may have happened if you had an older version of WowLua installed previously, in which case you shouldn't see it again.
Having some issues right now.. Just bought the book (skimming through the first 2 chapters because of C & Java knowledge), figured I'd try wowlua out as its suggested, and getting a few errors popping up...
R19 version from wowinterface, I get this error when opening wowlua via /wowlua or /lua:
Code:
[2008/05/09 17:28:02-103-x1]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:582: attempt to index local 'entry' (a nil value)
Interface\FrameXML\ChatFrame.lua:3032: in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2724: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2745: in function `ChatEdit_OnEnterPressed':
<string>:"*:OnEnterPressed":1: in function <[string "*:OnEnterPressed"]:1>
---
WoWLua version from the wowprogramming website I can actually open, however I get these errors:
Code:
[2008/05/09 17:17:48-102-x3]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:411: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:262: in function `Button_OnClick'
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Code:
[2008/05/09 17:18:01-102-x2]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:57: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:418: in function `Button_Lock'
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:264: in function `Button_OnClick'
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
Code:
[2008/05/09 17:18:04-102-x5]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:563: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:279: in function `Button_New'
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:254: in function `Button_OnClick'
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Code:
[2008/05/09 17:18:26-102-x3]: WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:563: attempt to index local 'entry' (a nil value)
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:551: in function `Button_Close'
WowLua-WowLua 1.0 Interactive Interpreter\WowLua.lua:274: in function `Button_OnClick'
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
---
Originally posted by Treader This is neat. I do have 1 suggestion, though, I would love to have the option to press the up arrow to cycle through the last typed commands.
Edit: It's really easy to add this functionality. Just put this into the OnEnterPressed handler in the XML file:
Code:
local text = self:GetText();
WowLua:ProcessLine(text);
self:AddHistoryLine(text);
Yeah, not sure how this got left out, since it was in the last version. I'll add it back in.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Originally posted by Lombra r8 seems to be packed incorrectly. (no main folder) Just fyi
Thanks, I didn't pack it.. but I can certainly re-pack it.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Originally posted by JaedxRapture
[b]I noticed some strange behaviour with this addon that annoyed me a little bit. It doesn't seem to properly indent blocks. For example, the following block:
Code:
if someCondition and someOtherCondition then
doSomething()
elseif yetAnotherCondition then
doSomethingElse()
end
would show up like this in WowLua:
Code:
> if someCondition and someOtherCondition then
>> doSomething()
>> elseif yetAnotherCondition then
>> doSomethingElse()
>> end
rather than like this:
Code:
> if someCondition and someOtherCondition then
>> doSomething()
> elseif yetAnotherCondition then
>> doSomethingElse()
> end
This addon operates exactly as a standalone Lua interpreter does. There is no way to tell when you've ended the next level of the block, so it doesn't even try. I don't have plans to change this here.
However, I plan to introduce a block mode that allows you to easily write longer functions without needing to use the interpreter.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
Is there any chance you could make the screen clamping a bit more forgiving? I like to move my code windows partially off the screen since it's more efficient (read: easier) than resizing. Or perhaps some sort of special click to minimize the frame like double clicking on a mac os title bar...
Originally posted by Andalia If it loads on Login, the functions and some vars are created right away and with lod even they aren't loaded.
I always thought that this would make a difference.
But as I'm sure you know about that I guess it really doesn't make one.
I'm just curious because it is something I want know because I a few litte addons myself
For a larger addon, it can make an enormous difference, but for something as small as WowLua, its a negligable difference.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
If it loads on Login, the functions and some vars are created right away and with lod even they aren't loaded.
I always thought that this would make a difference.
But as I'm sure you know about that I guess it really doesn't make one.
I'm just curious because it is something I want know because I a few litte addons myself
I don't really see a need for that, as nothing is created until you invoke the addon. Its the exact same behavior you would see with AddonLoader.
__________________
"There's only one thing that I know how to do well and I've often been told that you only can do what you know how to do well, and that's be you-- be what you're like-- be like yourself. And so I'm having a wonderful time, but I'd rather be whistling in the dark..."
There's just one thing that would make it even better imo
It would be very cool if you could add AddonLoader-support to this addon.
Since it would be optional, nobody would be hurt by the ace2 libs and afaik it wouldn't loose any of its funcionality.
It's just a minor thing anyway but it would be nice.