Take a tour !

A quick overview of Luart

Dive into the framework

You are right : doing some "Hello World !", even object-oriented, does not put you anywhere. Now that you have discovered some of the basic concepts provided by Luart, it's time to dive more into the framework.

Luart provides a lots of modules, objects, and functions to develop Windows programs rapidly. Let's get a sneak peak of what you can do :

Here we are creating an instance of a Directory object from the sys module, that is available globally, without the need to require for it. By default, the Directory instance represents the current directory if no other path is provided during instantiation.

The for loop iterate over each Directory elements (files, or other directories) and prints their names to the console, using their name property. You have reproduced in a few lines of code the dir DOS command !

It's raining again

Let's try something more complicated :

Yes, that's the current weather near your location, in only 3 lines of Lua code !Thanks to the Http object from the net module, calling the wttr.in REST API is simple with Luart.
First we need to require the net module, then we create a new Http instance with the address "https://wttr.in". Once connected to the website, we wait for the Http:get() method to send an HTTP GET request (with the await() helper function). The result of this method call is the server response, a table that contains the current weather as text in its content field.

Open the Window

Console is great, but desktop applications are more user-friendly :

We just have required the ui module that provides objects, and functions to build native Windows GUI applications. Then we have created a Window instance with the string "Hello World !", that will be the Window's title. A call to the Window:center() method centers the Window in the middle of the screen... But wait...nothings happen, where is the Window ?

By default, a just created Window is hidden. Just call the Window:show() method to show it ! Congratulation ! You have created your first Window with Luart !

Best things come to an end

So that ends the quick tour of Luart. You have now acquired the basics. I hope you had some fun using the framework. We have a lot more to explore, including the different modules, objects and functions included with Luart

The next step will be to familiarize yourself with the different components of the framework. Do not hesitate to dive into the documentation, to try the different examples and tutorials available, and in case of difficulties, to ask for help on the Luart Community forum.