It is currently April 28th, 2024, 9:54 am
Get help with creating, editing & fixing problems with skins
dollarsan
Posts: 3 Joined: July 5th, 2012, 11:18 am
Post
by dollarsan » July 5th, 2012, 11:32 am
I have a now playing meter that I've modified from the ElementaryRMX skin. I want to make the fontcolor of the song title change when a new song begins. Is there any code that will do this?
Code: Select all
[Rainmeter]
Author=JackDMF | jackdmf.deviantart.com based on Flying Hyrax's Elementary Weather Skin (flyinghyrax.deviantart.com)
Update=1000
AppVersion=2000000
DynamicWindowSize=1
[Metadata]
Name=ElementaryRMX Now Playing
Config=ElementaryRMX | Now Playing
Description=Displays current song and details
Instructions=Change your player in Variables.inc
Version=1.5.1
Tags=music | basic | elementary | clean | Century Gothic | Futurist Fixed-Width
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=1
Preview="#SKINSPATH#\Elementary\elementaryrmx_prev.jpg"
[Variables]
@include=#ROOTCONFIGPATH#Variables.inc
@include2=#ROOTCONFIGPATH#Languages\#language#.txt
; # # # # # Begin Measures # # # # #
[msrPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=TITLE
PlayerPath=
DisableLeadingZero=0
Substitute="":"."
; Return value is 1 on error
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterShowMeter ErrorMessage][!RainmeterRedraw]
[msrArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=ARTIST
Substitute="":"."
[msrAlbum]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=ALBUM
Substitute="":"."
[msrCover]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=COVER
Substitute="":"Default.png"
[msrPosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=POSITION
[msrDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=DURATION
[msrProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=PROGRESS
[msrRating]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=RATING
[msrStateText]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=STATE
Substitute="0":"#stopped#","1":"#playing#","2":"#paused#"
; # # # # # Begin Meters # # # # #
[mtrString]
Meter=STRING
MeasureName=msrPlayer
MeasureName2=msrArtist
MeasureName3=msrAlbum
X=920
Y=0
FontColor=#color#
FontSize=((30*#phi#)*#phi#)
FontFace=#font2#
StringAlign=Center
StringStyle=#style#
StringCase=UPPER
AntiAlias=1
Text="Currently playing %1 #from# %3 #by# %2"
SolidColor=0,0,0,0
; # # # # # finish # # # # #
Thank you!
Mordasius
Posts: 1173 Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8
Post
by Mordasius » July 5th, 2012, 12:17 pm
You could use [msrPosition] to instigate the change in font color every time a new track starts:
Code: Select all
[msrPosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=POSITION
IfEqualValue=0
IfEqualAction=!SetOption mtrString FontColor [MeasureTrackFontColors]
DynamicVariables=1
All you need to do is decided what range of font colors you want to use and how these will be set by the measure [MeasureTrackFontColors]
poiru
Developer
Posts: 2872 Joined: April 17th, 2009, 12:18 pm
Post
by poiru » July 5th, 2012, 12:28 pm
Mordasius wrote: You could use [msrPosition] to instigate the change in font color every time a new track starts:
...
Or you could simply use
TrackChangeAction
dollarsan
Posts: 3 Joined: July 5th, 2012, 11:18 am
Post
by dollarsan » July 5th, 2012, 2:03 pm
I tried using TrackChangeAction but it doesn't seem to be working. Or am I using the wrong command? I'm sorry but I'm quite clueless about how to use this command.
Code: Select all
[mtrString]
Meter=STRING
MeasureName=msrPlayer
MeasureName2=msrArtist
MeasureName3=msrAlbum
X=920
Y=0
TrackChangeAction=[!SetOption msrPlayer FontColor 0,255,0,255]
FontColor=#color#
FontSize=((30*#phi#)*#phi#)
FontFace=#font2#
StringAlign=Center
StringStyle=#style#
StringCase=UPPER
AntiAlias=1
Text="Currently playing %1 #from# %3 #by# %2"
SolidColor=0,0,0,0
LeftMouseUpAction = !Execute ["http://www.youtube.com/results?search_query=[msrPlayer]"]
KreAch3R
Posts: 608 Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR
Post
by KreAch3R » July 5th, 2012, 2:37 pm
In the !SetOption bang you have to specify the meter in which the option resides, not the measure that provides the data. Like this: TrackChangeAction=[!SetOption mtrString FontColor 0,255,0,255]
poiru
Developer
Posts: 2872 Joined: April 17th, 2009, 12:18 pm
Post
by poiru » July 5th, 2012, 3:14 pm
KreAch3R wrote: In the !SetOption bang you have to specify the meter in which the option resides, not the measure that provides the data. Like this: TrackChangeAction=[!SetOption mtrString FontColor 0,255,0,255]
And TrackChangeAction needs to be under [msrPlayer].
KreAch3R
Posts: 608 Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR
Post
by KreAch3R » July 5th, 2012, 3:58 pm
poiru wrote:
And TrackChangeAction needs to be under [msrPlayer].
Affirmative, sir, I missed that.
dollarsan
Posts: 3 Joined: July 5th, 2012, 11:18 am
Post
by dollarsan » July 5th, 2012, 6:17 pm
I put the code in but the color doesn't change. Is it because of the variables file? I guess I could just make it a separate skin. How do I tell the script to pick a random font color or choose from a specific list of hex codes?
Thanks in advance for all your help!
Code: Select all
[Rainmeter]
Author=JackDMF | jackdmf.deviantart.com based on Flying Hyrax's Elementary Weather Skin (flyinghyrax.deviantart.com)
Update=1000
AppVersion=2000000
DynamicWindowSize=1
[Metadata]
Name=ElementaryRMX Now Playing
Config=ElementaryRMX | Now Playing
Description=Displays current song and details
Instructions=Change your player in Variables.inc
Version=1.5.1
Tags=music | basic | elementary | clean | Century Gothic | Futurist Fixed-Width
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=1
Preview="#SKINSPATH#\Elementary\elementaryrmx_prev.jpg"
[Variables]
@include=#ROOTCONFIGPATH#Variables.inc
@include2=#ROOTCONFIGPATH#Languages\#language#.txt
; # # # # # Begin Measures # # # # #
[msrPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=TITLE
PlayerPath=
DisableLeadingZero=0
Substitute="":"."
TrackChangeAction=[!SetOption mtrString FontColor=86,223,248,180]
; Return value is 1 on error
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterShowMeter ErrorMessage][!RainmeterRedraw]
[msrArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=ARTIST
Substitute="":"."
[msrAlbum]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=ALBUM
Substitute="":"."
[msrStateText]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[msrPlayer]
PlayerType=STATE
Substitute="0":"not playing anything","1":"#playing#","2":"#paused#"
; # # # # # Begin Meters # # # # #
[mtrString]
Meter=STRING
MeasureName=msrPlayer
MeasureName2=msrArtist
MeasureName3=msrAlbum
MeasureName4=msrStateText
X=920
Y=0
FontColor=255,255,255,255
FontSize=((30*#phi#)*#phi#)
FontFace=#font2#
StringAlign=Center
StringStyle=normal
StringCase=UPPER
AntiAlias=1
DynamicVariables=1
Text="Currently %4 %1 #from# %3 #by# %2"
SolidColor=0,0,0,0
LeftMouseUpAction = !Execute ["http://www.youtube.com/results?search_query=[msrPlayer]"]
; # # # # # finish # # # # #
KreAch3R
Posts: 608 Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR
Post
by KreAch3R » July 5th, 2012, 6:53 pm
Remove the "=" sign. Check the syntax
here :
!SetOption [Meter/Measure] [Option] [Value] (Config)
Regarding your other question, my top of the shelf guess is the Quote Plugin and an external file with the colors.
MerlinTheRed
Rainmeter Sage
Posts: 889 Joined: September 6th, 2011, 6:34 am
Post
by MerlinTheRed » July 6th, 2012, 6:34 am
Or a Lua script that generates random colours or chooses a random entry of an array of colours you specify in the script. You could run the script as a TrackChangeAction too with almost no modifications to your existing code needed.