Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1056

Help: Rainmeter Skins • Re: Mond - Can't Find Image Path

$
0
0
Player.ini - Snipped to the MeasureStateButton portion for brevity

Code:

[MeasureStateButton]Measure=PluginPlugin=NowPlayingPlayerName=#Player#PlayerType=STATESubstitute="0":"#@#Play.png","1":"#@#Pause.png","2":"#@#Play.png"
Correct Response - File path for the Stopped/Paused state

Code:

\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png
Wrong Response - File path for the Play state

Code:

\\19\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png.168.XXX.\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png0\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Pause.png
I have a workaround which is to hardcode the Play state file path but I rather avoid hardcoding things.

Any ideas how to fix this? Thanks.
This looks like you're trying to substitute your actual Pause.png path with the paths to Play.png or Pause.png, instead of replacing the numerical 0, 1 or 2 values of the PlayerType=State measure. Check these and you'll understand what happens (I replaced the NowPlaying measures with some Calc and String ones, simply to replicate various results):

Code:

[Good1]Measure=CalcFormula=2Substitute="0":"\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png","1":"\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Pause.png","2":"\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png"[Good2]Measure=CalcFormula=2RegExpSubstitute=1Substitute="^0$":"\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png","^1$":"\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Pause.png","^2$":"\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png"[Bad1]Measure=StringString="\\192.168.XXX.202\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Pause.png"Substitute="2":"\\192.168.XXX.XXX\XXXData\Documents\Rainmeter\Skins\Mond\@Resources\Play.png"
Normally, even without using RegExpSubstitute=1 and the ^ and $ anchors for the start and end of the string in the pattern, in order to restrict the substitution to happen only once for the "0", "1" and "2" strings and not for every 0, 1 or 2 within a string, what you experienced shouldn't have occured. The main possibility is that you're performing the substitution on the wrong value (e.g. some actual path instead of the NowPlaying state number).

Statistics: Posted by Yincognito — Today, 6:46 pm



Viewing all articles
Browse latest Browse all 1056

Trending Articles