LUA has been implemented with the NLua engine.
- Syntax highlighting
- Compilation (LUA is interpreted -> no compilation needed)
- Execution
- Console ouput
- Return values
- Diagnostics
- Errors
To use LUA, the Fiddle directory (default: C:\Program Files\Fiddle
) must contain the corresponding LUA library (or both): x64\lua52.dll
and/or x86\lua52.dll
.
If your installation does not contain those libraries, you can extract them manually from the portable (Fiddle.zip
) version.
You can use the following Globals/Variables inside your code:
-
Random
(object, .NETSystem.Random
, msdn): Create random numbers withRandom:Next(..)
-
Console
(object, .NETSystem.IO.StringWriter
, msdn): Write to Console withConsole:WriteLine(string)
orConsole:Write(string)
-
CurrentThread
(object, .NETSystem.Threading.Thread
, msdn): The thread this got initialized on (mostly UI Thread), can be used to access all properties or functions from aSystem.Threading.Thread
. -
Editor
(object, FiddleFiddle.UI.Editor
(fromSystem.Windows.Window
, msdn)): Fiddle's Editor window, can be used to access allUIElements
, properties, public functions or functions derived fromSystem.Windows.Window
. (Editor XAML code, Editor source code) -
App
(object, .NETSystem.Windows.Application
, msdn): Fiddle's callingApplication
/App
, can be used to access all properties or functions derived fromSystem.Windows.Application
) -
RunUi(Action)
(function,void Invoke(Action)
, declaration): A function with an anonymous function orAction
as a parameter to execute code on the UI Thread. This is required for getting/setting properties or calling functions fromEditor
orApp
because those are not thread safe.
/