It is currently May 21st, 2024, 10:18 am

Working with Lua and DLLs

Get help with creating, editing & fixing problems with skins
Cheese Chaos
Posts: 23
Joined: April 3rd, 2012, 1:25 am

Working with Lua and DLLs

Post by Cheese Chaos »

As I've been working on my own skins in Rainmeter and trying to solve various issues, I'd run into things that Rainmeter cannot accomplish. Most of Rainmeter's basic functionalities satisfy my current needs, but eventually I'd like to be able to do some of the things where Rainmeter is limited. Two things I see mentioned in these situations pretty often are Lua and DLL plugins.

I know Lua is a scripting language, but I'm not quite sure what that really means. It seems to be an intermediary language in that it usually doesn't run on its own. It runs alongside something else to give it additional functionality. I contemplated picking up Lua a few times in the past to develop my own addons for games I played but never really got into it.

I have an idea of what DLLs are, but as with Lua, my understanding is a bit limited. I've always liked the idea of being able to write code that interacts with the operating system. I'm guessing this would be done with DLLs.

Mountain of questions:
1. What sorts of things can each of these do with respect to Rainmeter?
2. What about normally?
3. Would one of these be more limited than the other? (Rainmeter)
4. Are DLLs written in a specific language? Is that dependent on the application that uses the DLL?
5. Which might be easier to learn and develop with a background (novice-to-intermediate) in c#, java, and html/css?

Which one would you prefer to use to try implementing the following?: (if it's even possible with these tools)
1. Adding "Drag and Drop" functionality to a skin to allow moving/copying of files.
2. Handling complex logic that may require (or be much easier implement with) data structures or conditional loops.
3. Adding a "Scroll Up" or "Scroll Down" of the mousewheel to the list of mouse actions.

I think that's about all I've got for now. Feel free to clear up any misconceptions I may have or add some information that you think may be helpful. Since these are fairly broad topics, helpful links on understanding these technologies might suffice in replacing an explanation.
User avatar
jsmorley
Developer
Posts: 22634
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Working with Lua and DLLs

Post by jsmorley »

Just at a thousand foot level:

Lua has no capability to interact with Windows at all. It is a platform agnostic scripting language, and could care less if you are on Windows or Linux. There is no way you are going to get anything like drag and drop or window scrolling going in Lua. In fact, you are not going to be able to do one thing that has to do with a GUI at all. It's not what Lua is about.

You can use Lua to build fairly complex processing of information though. It can do really nice stuff with arrays (tables in Lua) and since it can communicate with Rainmeter in a lot of ways, it can be used to add a lot of data-driven functionality that is hard or impossible in native Rainmeter.

As to .dll files, the only way Rainmeter can interact with them is by having them be a plugin for Rainmeter. That means they need to be specifically written as a Rainmeter plugin. You certainly can do a lot of things in a plugin, including interacting with Windows in almost any way you can imagine. You can write plugins for Rainmeter in either C++ or C#, and more information is here: http://rainmeter.net/cms/Developers. This is going to require some experience / expertise coding in one of the two languages above, and the installation of the appropriate development environment for the language.
Cheese Chaos
Posts: 23
Joined: April 3rd, 2012, 1:25 am

Re: Working with Lua and DLLs

Post by Cheese Chaos »

Based on your response and the response I got in my other thread, I think I may try out Lua first. I've had a few issues with trying to do some computations and figuring out how to get things to work in Rainmeter. Since it seems Lua will give me the ability to do a bit more customization with Rainmeter and various games I may play, I think it'll be a nice skill to have under my belt.