It is currently May 5th, 2024, 11:09 am

Advanced modification of existing (jmorley's )script.

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Advanced modification of existing (jmorley's )script.

Post by jsmorley »

Fair enough, but I stand by my post. I used the terms "realistically" and "dynamic" and "relative positioning" on purpose and for a reason.

Having a Lua script that treats each section of the string that should remain one color as one String meter, and any section that is a different color as another String meter is not difficult. You can't create or remove meters from a running skin, but sure, you could just build a skin with some "maximum" number of meters, then just "hide/show" them based on if they are used or not. That assumes that the maximum is something knowable and reasonable. The maximum isn't based on how many words are in the string, but only on how many times the color is changed. How do you know that? Still let's assume you do...

It starts to get more complicated when the overall text is going to be used in the context of a larger skin. Hidden meters, even though they are set to a W and H of "0", take up a position in "space" when they have a "relative" X or Y associated with them. So if you have 10 meters that are hidden because you don't need them, any meters that come "after" them will not be positioned anything near correctly. While you can design your skin to account for this, its going to limit what you can do. It will be a challenge to have meters that come after this "string" be positioned relative to the result.

It will take a different approach than just X=5R. It will mean dynamically setting X on the meter to ([SomeOtherMeter:X]+[SomeOtherMeter:W] + 5) or some such, and using DynamicVariables. You don't want it relative to the "previous" meter, but the last "actually used" meter. Whether the relative position desired is X or Y or both, the potential issue is the same.

In any case, I also used the term "Rube Goldberg" carefully and on purpose. The point is that Rainmeter does not support "inline formatting" in a String meter, and attempts to trick it into doing so are going to take some complicated Lua code and have challenges and limitations.

What I didn't say is "impossible". Almost nothing is... What I said was "not realistic".
mochibear
Posts: 45
Joined: June 3rd, 2014, 11:16 pm

Re: Advanced modification of existing (jmorley's )script.

Post by mochibear »

That's ok guys!

I figured out of the two, that one would be the challenge.

Another option is to create a different entry just for the title, bolded.
mochibear
Posts: 45
Joined: June 3rd, 2014, 11:16 pm

Re: Advanced modification of existing (jmorley's )script.

Post by mochibear »

Thanks for the help with this guys!

I was able to bold the title by creating an independent script and placing it on top of the lists.

Code: Select all

[QuoteStyle]
FontFace=Segoe UI
FontSize=13
FontColor=255,0,0	
StringStyle=BOLD
AntiAlias=1


[Quote]
Meter=STRING
MeterStyle=QuoteStyle
Text=**INBOX**
Looks very nice :)