It is currently September 19th, 2020, 4:52 pm

Creating Plugins

Share and get help with Plugins and Addons
[D]
Posts: 9
Joined: May 20th, 2009, 3:49 am

Creating Plugins

Post by [D] »

Hey all, I'm completely new to rainmeter and for that matter coding of most types.

My question is thus: How does one start a plugin for rainmeter? Is there a format or skeleton you use to create one? I'm trying to create what I believe is a Quote.

I'm hoping to change my rainmeter to "say" one of several random lines of texts at different times of the day.

Ex.) Every five minutes, one of one hundred lines of text is chosen and appears in a "word bubble" that has already been preset in place.
***

Could I get some help learning how to create such a plugin? With this sort of help, I think I could go about creating others- I'm just at a complete loss as to how even start one.
dragonmage
Developer
Posts: 1286
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Creating Plugins

Post by dragonmage »

Rainmeter comes with a QuotePlugin that will do what you want already.

As far as building plugins there is some info on that in the Manual
[D]
Posts: 9
Joined: May 20th, 2009, 3:49 am

Re: Creating Plugins

Post by [D] »

Unfortunately, I've read through it and don't understand exactly how to do it. Maybe I'm looking at it in the wrong way... I'm looking at it in a way similar to <html> stlylings, where there needs to be an opening tag, directions/descriptions, then a closing tag...

So, would this work? (Pathetic first attempt):

[MeasureQuote]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=%HOMEDRIVE%%HOMEPATH%\My Documents\RANDOMQUOTES\ (If RANDOMQUOTES serves as my lines of text.)
Subfolders=1

I'm can't make heads or tails of the manual; sorry if I'm irritating, but I really want to learn to craft for things like rainmeter.
sgtevmckay

Re: Creating Plugins

Post by sgtevmckay »

Apologies for not being of much assistance here, but I have to comment on other things.

There is nothing pathetic in what I see!
Know that we all start somewhere :D
If you had asked me a couple of months ago if I woule be skinning, I would have laughed, embarrassed!

And I find nothing irritating here, understand that as you are learning and being taught, so am I.
Understand we have several types of folks in the world, and especially here:
Those that are afraid to ask.
Those, like yourself, that will ask. :D
And those like, myself, that do not understand what to ask :lol: :oops:

As you ask your questions, post your code, and struggle to learn, I am learning, and so I think do others :geek:

Our forum is becoming a well of information, and it is good watch folks like yourself on this forum grow with it everyday.

It is a pleasure to have all of the forum folks come forward with their questions, and for quite a few of us; the challenge of overcoming and learning is the great reward.

So do not hesitate, ask away 8-)
And if you want an idea of being annoying, and how the forum community has patience, you can look over the following forum:
http://forum.rainmeter.net/viewtopic.php?f=5&t=128
Trust me when I say, you have not hit annoying; nowhere close :D
[D]
Posts: 9
Joined: May 20th, 2009, 3:49 am

Re: Creating Plugins

Post by [D] »

Firstly, thank you so much. I've seen newbies ask questions before and be eaten alive over things the veterans simply understood. I really appreciate the support as far as being new goes, though!

Oh, and to add on to my original question, I'm unsure of where to put the code and how to save it once I type it up. Do I save it as a .dll and place it in the Plugins folder? Do I write it into the Plugins folder? I'm at a complete loss. :<

Sorry for not knowing the VERY basics, but like I said, my background is the most basic html, and so with it, I was able to fiddle with a basic skeleton format in order to learn. With the coding here, I'm mashing my face on the keyboard. XD
User avatar
jsmorley
Developer
Posts: 21365
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Creating Plugins

Post by jsmorley »

[D] wrote:Firstly, thank you so much. I've seen newbies ask questions before and be eaten alive over things the veterans simply understood. I really appreciate the support as far as being new goes, though!

Oh, and to add on to my original question, I'm unsure of where to put the code and how to save it once I type it up. Do I save it as a .dll and place it in the Plugins folder? Do I write it into the Plugins folder? I'm at a complete loss. :<

Sorry for not knowing the VERY basics, but like I said, my background is the most basic html, and so with it, I was able to fiddle with a basic skeleton format in order to learn. With the coding here, I'm mashing my face on the keyboard. XD
True .dll plugins for Rainmeter need to be written in C++ and may not be the absolute best place for a new programmer to start. A better than beginning understanding of "Dynamic Link Libraries" and the C code to "initialize" them, exchange input / output variables with the calling application, call Windows API functions, do resource cleanup and terminate without messing up Windows takes a bit of knowledge. I am not trying to discourage you though, do a Google search for "writing dynamic link libraries" and see if it is something you want to tackle by all means!

Here is a good starting point... http://www.zetnet.co.uk/rad/dll.html
[D]
Posts: 9
Joined: May 20th, 2009, 3:49 am

Re: Creating Plugins

Post by [D] »

Wow, that will definitely help! Thank you so much, I'll read through a few times and come back with a second shot at this to check if I've gotten it down. Thanks again! I'll be back tomorrow with a new set of code.

A quick edit: I only need Notepad to edit and change around the rainmeter .dll's don't I? I read just now that they can be created as an extension from C++ programs such as GNU and others, but no mention of Notepad. Could I get a bit of clarification?
User avatar
jsmorley
Developer
Posts: 21365
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Creating Plugins

Post by jsmorley »

[D] wrote:Wow, that will definitely help! Thank you so much, I'll read through a few times and come back with a second shot at this to check if I've gotten it down. Thanks again! I'll be back tomorrow with a new set of code.

A quick edit: I only need Notepad to edit and change around the rainmeter .dll's don't I? I read just now that they can be created as an extension from C++ programs such as GNU and others, but no mention of Notepad. Could I get a bit of clarification?
Umm... Sure, you can use Notepad to edit code, but I don't really recommend it. Better to use either:

1. A good text editor with some programming capabilities (like color coding based on language, matching braces, code folding, advanced search and replace etc.) Notepad++ or UltraEdit are both really good.

2. The editing environment in a C++ development tool like Microsoft Visual Studio. This will include additional capabilities like debugging and compiling right in the tool.
[D]
Posts: 9
Joined: May 20th, 2009, 3:49 am

Re: Creating Plugins

Post by [D] »

Hm... I just started downloading Visual Basic Express or something along those lines. Will this work appropriately?
dragonmage
Developer
Posts: 1286
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Creating Plugins

Post by dragonmage »

Try Visual C++ 2008 Express.

As I was saying before though the supplied quote plugin will do what you are talking about.
Your example was on the right track...
[MeasureQuote]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName=%HOMEDRIVE%%HOMEPATH%\My Documents\RANDOMQUOTES\ (If RANDOMQUOTES serves as my lines of text.)
Subfolders=1
Now is RANDOMQUOTES a single file or is it a folder containing multiple quote files?