It is currently April 24th, 2024, 8:49 am

Using New Media Player and Something is not working now... [solved]

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Using New Media Player and Something is not working now... [solved]

Post by CodeCode »

So I stopped using iTunes, and switched to JRiver, which I really like.

I have the option on my player skin to switch from time remaining on a song to how much has been played. The merers and Measures are these:

Code: Select all


[mDuration]
Measure=NowPlaying
PlayerName=[MeasureTrack]
PlayerType=DURATION

[mPosition]
Measure=NowPlaying
PlayerName=[MeasureTrack]
PlayerType=POSITION

[mMinRemaining]
Measure=Calc
Formula=trunc((mDuration - mPosition)/60)
RegExpSubstitute=1
;Substitute="^(.)$":"0\1"

[mSecRemaining]
Measure=Calc
Formula=((mDuration - mPosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"

[mTimeD]
Meter=String
MeasureName=mPosition
MeasureName2=mMinRemaining
MeasureName3=mSecRemaining
X=140
Y=180
StringAlign=Center 
FontColor=#ColorZ#
AntiAlias=1
FontSize=16
StringStyle=Bold
Text="%1/%2:%3"
InlineSetting=Color | #Gothd#
InlinePattern=(.*)/.*
InlineSetting2=Color | #Gothd#
InlinePattern2=.*/(.*)
DynamicVariables=1
Hidden=0
Group=Detail

[mTimeB]
Meter=String
MeasureName=mPosition
MeasureName2=mDuration
X=140
Y=180
StringAlign=Center 
FontColor=#ColorZ#
AntiAlias=1
FontSize=16
StringStyle=Bold
Text="%1/%2"
InlineSetting=Color | #Gothd#
InlinePattern=(.*)/.*
InlineSetting2=Color | #UsedColor#
InlinePattern2=.*/(.*)
DynamicVariables=1
Hidden=1
Group=Basic

[TheModeCalc]
Measure=Calc
Formula=#State#
IfEqualValue=0
IfEqualAction=[!SetOption MeterTimeMode ImageName "#@#TotalTime.png"][!UpdateMeter *][!Redraw]
IfAboveValue=0
IfAboveAction=[!SetOption MeterTimeMode ImageName "#@#TimeRemain.png"][!UpdateMeter *][!Redraw]
DynamicVariables=1

[MeterTimeMode]
Meter=Image
ImageTint=#MySepiaTint#
X=69
Y=227
W=35
H=35
LeftMouseUpAction=[!SetVariable State "(1-#State#)"][!WriteKeyValue Variables State "(1-#State#)"][!UpdateMeter *][!Redraw]
LeftMouseDowAction=[!ToggleMeterGroup Detail][!ToggleMeterGroup Basic][!RefreshGroup Detail][!RefreshGroup Basic][!Redraw]
MouseOverAction=[!SetOption "TimeModeOver" "Hidden" "0"][!Update]
MouseLeaveAction=[!SetOption "TimeModeOver" "Hidden" "1"][!Update]
Group=buttons
I cant see why there is an issue but now only the time being played shows not the total time of the song...?
Last edited by CodeCode on October 19th, 2020, 4:55 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Using New Media Player and Something is not working now...

Post by balala »

CodeCode wrote: October 18th, 2020, 10:02 pm I cant see why there is an issue but now only the time being played shows not the total time of the song...?
In fact two things are shown: the position (play time) and the remaining time. This are exactly what have you asked through the [mTimeD] string meter. This meter has the following options:

Code: Select all

[mTimeD]
...
MeasureName=mPosition
MeasureName2=mMinRemaining
MeasureName3=mSecRemaining
...
Text="%1/%2:%3"
so it shows the value returned by the [mPosition] measure and those returned by the [mMinRemaining]:[mSecRemaining] measures, in this form. These are exactly what are you seeing on the skin.
Note that I suppose you've missed that the [mTimeD] meter is visible (having a Hidden=0 option) and [mTimeB] is not (being hidden by its Hidden=1 option). The solution to your question is to hide [mTimeD] and show [mTimeB], by chaning their Hidden options.
Am I right?
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using New Media Player and Something is not working now...

Post by CodeCode »

balala wrote: October 19th, 2020, 12:23 pm In fact two things are shown: the position (play time) and the remaining time. This are exactly what have you asked through the [mTimeD] string meter. This meter has the following options:

Code: Select all

[mTimeD]
...
MeasureName=mPosition
MeasureName2=mMinRemaining
MeasureName3=mSecRemaining
...
Text="%1/%2:%3"
so it shows the value returned by the [mPosition] measure and those returned by the [mMinRemaining]:[mSecRemaining] measures, in this form. These are exactly what are you seeing on the skin.
Note that I suppose you've missed that the [mTimeD] meter is visible (having a Hidden=0 option) and [mTimeB] is not (being hidden by its Hidden=1 option). The solution to your question is to hide [mTimeD] and show [mTimeB], by chaning their Hidden options.
Am I right?
Ok so the idea is that, yes there are two values at any given time, position and duration, or position and time remaining.

This line:
LeftMouseDowAction=[!ToggleMeterGroup Detail][!ToggleMeterGroup Basic][!RefreshGroup Detail][!RefreshGroup Basic][!Redraw]
Is supposed to toggle between those two variants of the same basic (duration) and detail (time remaining).

It used to work correctly. I changed nothing, but now somehow it does not toggle between the two variants any more. I cannot suss out why that would be happening, with the only change being the music app I am using.

I was hoping there was a locig short circuit I missed, but like I said, it used to work...
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using New Media Player and Something is not working now...

Post by CodeCode »

Ok, I got it to work, by changing where the mouse action was taking place and put everything on the same line:

Code: Select all

LeftMouseUpAction=[!SetVariable State "(1-#State#)"][!WriteKeyValue Variables State "(1-#State#)"][!ToggleMeterGroup Detail][!ToggleMeterGroup Basic][!UpdateMeter *][!Redraw]
Thanks for looking :)
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using New Media Player and Something is not working now...

Post by CodeCode »

CodeCode wrote: October 19th, 2020, 4:35 pm This line:
LeftMouseDowAction=[!ToggleMeterGroup Detail][!ToggleMeterGroup Basic][!RefreshGroup Detail][!RefreshGroup Basic][!Redraw]
There is actually a typo here in LeftMouseDownAction=... I noticed it but the problem persisted, so I changed everything to MouseUp and Bob's your uncle.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7151
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Using New Media Player and Something is not working now...

Post by Yincognito »

CodeCode wrote: October 19th, 2020, 4:53 pm Ok, I got it to work, by changing where the mouse action was taking place and put everything on the same line:

Code: Select all

LeftMouseUpAction=[!SetVariable State "(1-#State#)"][!WriteKeyValue Variables State "(1-#State#)"][!ToggleMeterGroup Detail][!ToggleMeterGroup Basic][!UpdateMeter *][!Redraw]
Thanks for looking :)
I'm not sure what was the problem, but you had a syntax error above: it's LeftMouseDownAction, not LeftMouseDowAction. I didn't test, but it's possible that this was the culprit.

That being said, it's recommended to use the "Up" actions of the mouse instead of the "down" ones, as the latter "steal" other abilities from Rainmeter, e.g. dragging, the skin context menu, etc.

EDIT: Ha! You were faster this time... :sly:
Last edited by Yincognito on October 19th, 2020, 9:00 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Using New Media Player and Something is not working now... [solved]

Post by balala »

CodeCode, let's summarize:
  • Instead of LeftMouseDownAction, LeftMouseUpAction is always preferable. In the Note here you can find out why.
  • Is your issue fixed now? I suppose it is, especially that you've marked the topic as solved. However if it still isn't, I usually use another approach to solve this kind of problems, but this requires to introduce a new variable. If you are interested, please let me know, to describe it, but as said, if the issue is fixed, doesn't worth to complicate things.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using New Media Player and Something is not working now...

Post by CodeCode »

CodeCode wrote: October 19th, 2020, 4:53 pm Ok, I got it to work, by changing where the mouse action was taking place and put everything on the same line:

Code: Select all

LeftMouseUpAction=[!SetVariable State "(1-#State#)"][!WriteKeyValue Variables State "(1-#State#)"][!ToggleMeterGroup Detail][!ToggleMeterGroup Basic][!UpdateMeter *][!Redraw]
Thanks for looking :)
Yep Solved. Thanks. I do know that the Up action is preferred, as I learnt on my own due to things behaving not so good on the Down action from more circumstances than I would list, for sanities sake. Just the same for example; on the down action if the mouse moves multiple triggers could be initiated, for one and this is prevented as on the up action the trigger is definitive in this view, and again amongst others.

Thanks again. :thumbup:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using New Media Player and Something is not working now...

Post by CodeCode »

Yincognito wrote: October 19th, 2020, 5:04 pm EDIT: Ha! You were faster this time... :sly:
Fastest pun in the west! :lol:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16164
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Using New Media Player and Something is not working now... [solved]

Post by balala »

Glad to help from my part.