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

Help: Rainmeter Skins • Re: Play / Pause action trigger in a skin

$
0
0
Here is an example:

Code:

[MeasurePlayer]Measure=PluginPlugin=NowPlayingPlayerName=#Player#PlayerType=Title[MeasureState]Measure=NowPlayingPlayerName=[MeasurePlayer]PlayerType=State
If you set correctly the Player variable in the [Variables] section, the [MeasureState] measure is returning:
  • 0 when the player is stopped
  • 1 when it's playing
  • 2 when it's paused.
Now you can add the proper IfCondition to the [MeasureState] measure, to get what you want. For instance this way (add these options to the measure, but don't remove or alter the previously existing options):

Code:

[MeasureState]...IfCondition=(#CURRENTSECTION#=1)IfTrueAction=[!ShowMeter "Meter-To-Be-Shown-When-Playing"][!HideMeter "Meter-To-Be-Hidden-When-Playing"][!Redraw]IfFalseAction=[!HideMeter "Meter-To-Be-Shown-When-Playing"][!ShowMeter "Meter-To-Be-Hidden-When-Playing"][!Redraw]
Note the followings:
  • The above IfCondition is true when the player is playing. In this case IfTrueAction is executed, showing the [Meter-To-Be-Shown-When-Playing] meter and hiding the [Meter-To-Be-Hidden-When-Playing] meter. Obviously here you have to add the meters you want to show and hide.
  • When the IfCondition is false (take care this happens both, when the player is stopped, and when it's paused as well), [Meter-To-Be-Shown-When-Playing] is hidden, while [Meter-To-Be-Hidden-When-Playing] is shown.
  • Doesn't really matter how you hide or show the [Meter-To-Be-Shown-When-Playing] and the [Meter-To-Be-Hidden-When-Playing] meters, by adding Hidden=1 options to them. Doesn't matter, because their state is specified by the bangs of the above IfTrueAction and IfFalseAction options.
Ifthis was not clear enough and you can't deal with it, I wait for a sample code you're working with, for much more specific help.

Statistics: Posted by balala — Yesterday, 3:24 pm



Viewing all articles
Browse latest Browse all 1158

Trending Articles