It is currently March 28th, 2024, 5:59 pm

Simple Text Marquee

Tips and Tricks from the Rainmeter Community
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple Text Marquee

Post by Yincognito »

LuciferVisuals wrote: May 2nd, 2023, 7:11 pm They may have changed a bit but I'm sure they will do.

Please do me a favor......... Watch it first before looking at the code of it will spoil the surprise, you have to wait about 3 or four seconds after the star wars animation for the surprise...... so don't be too impatient, oh wise one.

Keith
Well, it was certainly a nice surprise... lots of pieces of candy, for sure! Nice idea and integration - I wonder if it was the shrinking / fading away I alluded to on another occasion that gave you this idea or it was something else. Regarding the implementation, Transformation Matrices (TMs) are powerful indeed but they come with some drawbacks. In this case you could have gotten away with just the font size and Y dynamic adjustment, without the need for TM formulas (for simplicity). Maybe you can even fade away the text if you adjust its transparency too.

In any case, it looks and behaves very well - nicely done! Very creative as well! Thanks for the surpise, you didn't dissapoint, as promised. :thumbup: :great: 8-)
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Simple Text Marquee

Post by LuciferVisuals »

Yincognito wrote: May 2nd, 2023, 8:22 pm Well, it was certainly a nice surprise... lots of pieces of candy, for sure! Nice idea and integration - I wonder if it was the shrinking / fading away I alluded to on another occasion that gave you this idea or it was something else. Regarding the implementation, Transformation Matrices (TMs) are powerful indeed but they come with some drawbacks. In this case you could have gotten away with just the font size and Y dynamic adjustment, without the need for TM formulas (for simplicity). Maybe you can even fade away the text if you adjust its transparency too.

In any case, it looks and behaves very well - nicely done! Very creative as well! Thanks for the surpise, you didn't dissapoint, as promised. :thumbup: :great: 8-)
Cool, and thank you.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Simple Text Marquee

Post by LuciferVisuals »

LuciferVisuals wrote: May 2nd, 2023, 8:30 pm
Cool, and thank you,

That's not all original code btw, but I had to do an unbelievable amount of work on it, and endure a "considerable" learning curve, just to understand it so that I could adapt it and get it basically doing what I wanted, never mind building it into a skin. But I knew you would appreciate the end result. There are a few things I will improve, but I'm not good at sitting on surprises. So it was good enough to show you. Thanks again.

Now I solved the problem of getting the two lots of code playing nicely, in the same file. I might continue with the other version, which does the same thing but has pretty different code, to see if I can get it working the way we were discussing before. I am so close to getting that working, and it would be good to know how to do it, I might have to do it in future.

Kind of depends on time really.

Keith

So will go back and read your previous post on the subject.
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple Text Marquee

Post by Yincognito »

LuciferVisuals wrote: May 2nd, 2023, 8:43 pmKind of depends on time really.
Yeah, sure, no worries. Take your time and do what you think it's best, no rush. :thumbup:
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Simple Text Marquee

Post by LuciferVisuals »

Yincognito wrote: May 2nd, 2023, 8:59 pm Yeah, sure, no worries. Take your time and do what you think it's best, no rush. :thumbup:
I have a few other Rainmeter ideas and projects, but don't want to really do much to them until after I sort out my chaotic directory structure, but will prob experiment with the odd bit here and there, specially if its fun, to balance out the slog of organizing stuff and amending code.

Bearing in mind I will prob have several projects come to a conclusion in quick succession, having cracked most of the immediate problems at least to proof of concept stage in what I have already done. And that each will not be small, I have decided on a suite of "projects" each self contained, with it's own mirror in resources, they will all be "compatible" and work with each other IF YOU PUT THEM IN THE SAME ROOT directory, or will work on their own......I have got all that sorted in my head, no prob.

BUT, I was thinking of making a lightweight version of credits, to "ship with every project", however I would like to code them all so they will use the version I have just made IF the user has downloaded it.

So is it possible, and how would you do it to code the following, to work from a button, obviously I can handle the button part no prob. It's just the part below;

IF this file is here.... Use it (The full version)
IF not use this one.... The lightweight one

Sounds relatively easy, but not sure where to start with it, as don't think I have have not done anything like that, however prob a piece of cake for you oh wise one :thumbup:

Keith
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple Text Marquee

Post by Yincognito »

LuciferVisuals wrote: May 3rd, 2023, 10:49 amSo is it possible, and how would you do it to code the following, to work from a button, obviously I can handle the button part no prob. It's just the part below;

IF this file is here.... Use it (The full version)
IF not use this one.... The lightweight one
There are many ways to do it:
- via command line or PowerShell command in a RunCommand measure
- via Lua
- via WebParser (e.g. if you get the empty string from a measure with URL="file://#somelocalpathhere#", CodePage=1200, RegExp="^(.*)$" and StringIndex=1 or even adding the proper bangs to FinishAction if it exists and OnConnectErrorAction if not)
- via the Quote plugin, etc.

Or, if it's about something that can be put in two .inc files having a similar structure, you could avoid the check altogether and just @include both in your .ini and let Rainmeter naturally override the things in the "lightweight" one with the things in the "full version" one based on the order of inclusion, e.g. simple example for [Variables] but you can set a fake section for this, I think:

\@Resources\Main.inc:

Code: Select all

[Variables]
var=Main
\@Resources\Full.inc:

Code: Select all

[Variables]
var=Full
\Skin.ini:

Code: Select all

[Variables]
@IncludeMain=#@#Main.inc
@IncludeFull=#@#Full.inc
...
...skin contents...
...
If one of the .inc files is missing, the other will be used. An error will appear in the log, but it will be functional. Obviously, since Main.inc is before Full.inc, if the latter exists, it will override the former (assuming almost identical structure to be overriden to begin with, of course), and if the latter doesn't, then the former will be used. This is easily seen if you look at the values of the var variable in the Skins tab of the About Rainmeter window aka the log.

As for buttons, I see you use them extensively. No problem with that, but just so you know, there are few skin designers that use them, since plain Image meters provide more flexibility and potential features, including replicating the leave, over and mouse down states of the "button" via the ImageTint option or dynamically changing the image used. Just saying.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Simple Text Marquee

Post by LuciferVisuals »

Yincognito wrote: May 3rd, 2023, 12:16 pm There are many ways to do it:
Indeed;

I have now looked into them all, and not too keen on any of them, but not a waste of time because it got me thinking, and I found a way using basic RM code to do it so any of my skins can tell if any of my other shins are present, and the use them if they are, or use something else if they are not. (or do nothing at all, come to that, if that's appropriate).

But.... Without errors or warnings !!

But I had no idea where to start a couple of hours ago, so thanks for the kick up the B@M and pointing me in the right direction.



Keith




PS. Also RE the Button usage, it was the first thing I mastered a month ago, and I guess I have worked it to death now, :lol: :lol: I must get round to looking at how other designers design their skins, but I prob better finish everything off and tidy up first. As I don't want to be tempted to start over what's practically finished. I can always redesign things later, but better to get some of them actually finished first I think.
Last edited by Brian on May 3rd, 2023, 5:48 pm, edited 1 time in total.
Reason: Fixed quote. It's easier to use the button to insert the quote bbcode instead of manually typing it out.
User avatar
LuciferVisuals
Posts: 226
Joined: April 11th, 2023, 7:04 pm

Re: Simple Text Marquee

Post by LuciferVisuals »

Yincognito wrote: May 3rd, 2023, 12:16 pm There are many ways to do it:
I have been nicely pulled up for drifting of subject so created one at the place below.


https://forum.rainmeter.net/viewtopic.php?t=42324

Keith
User avatar
RoseRain
Posts: 37
Joined: June 30th, 2022, 1:39 pm

Re: Simple Text Marquee

Post by RoseRain »

raiguard wrote: March 19th, 2019, 8:34 pm simplemarquee.gif
A simple, dynamic text marquee method. It will automatically marquee any length of text, with adjustable animation rate, start and end wait intervals, and text contents. It will automatically not marquee if the text is narrower than the container it is placed in.
I was wondering if anyone knows how to use this marquee method as a spotify player. Id like the title and artist to scroll in this way, using this marquee. I used to have one, but its been a long time and I lost everything. A fresh new code would be great. I am not good at this stuff. basically i just want the artist name to scroll and the song title to scroll below it if its long, but not scroll if its short. just like the skin says. I know its an old post, but I have had little luck with this for a long time! lol
User avatar
Yincognito
Rainmeter Sage
Posts: 7025
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Simple Text Marquee

Post by Yincognito »

RoseRain wrote: June 19th, 2023, 6:03 am I was wondering if anyone knows how to use this marquee method as a spotify player. Id like the title and artist to scroll in this way, using this marquee. I used to have one, but its been a long time and I lost everything. A fresh new code would be great. I am not good at this stuff. basically i just want the artist name to scroll and the song title to scroll below it if its long, but not scroll if its short. just like the skin says. I know its an old post, but I have had little luck with this for a long time! lol
After all these years of using Rainmeter (according to your own words), still not good at it and expecting someone else to do it for you? :???:

This one is literally as simple as copy pasting the code from the original post, adding the two corresponding NowPlaying measures for the artist and the title, then referencing those measures in the first two meters, instead of the #text...# variables. You can delete the third meter and ActionList3, obviously.

Do that and I'll add up the minimal rest needed for making it work as expected when the artist and title change, as well as positioning the container to the right to make room for the artist and title labels, if desired. Deal? :sly:
Post Reply