It is currently April 25th, 2024, 5:08 pm

Automatic Skin Loading to reduce CPU usage

Share and get help with Plugins and Addons
dicerabbit
Posts: 2
Joined: October 29th, 2015, 2:40 pm

Automatic Skin Loading to reduce CPU usage

Post by dicerabbit »

Is it possible to read a state from the NowPlaying plugin on one skin which then using an if statement etc, if a condition is met loads another skin?

A visualiser skin due to its nature runs my processor at 20% even at idle, I was wondering if it was possible to get the skin to load automatically using another skin that is checking / waiting for something like a track to begin playing to load the visualiser skin then subsequently close it when a track stops playing.

Any help would be lovely, thankyou ;-)
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Automatic Skin Loading to reduce CPU usage

Post by fonpaolo »

This is what I'm currently using:

Code: Select all

[MeasureTrack]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#Player#
PlayerType=TITLE
PlayerPath=
Substitute="":"No Title"
DisableLeadingZero=1
OnChangeAction=[!UpdateMeasureGroup TrackInfos][!UpdateMeter MeterTrack][!Redraw]

[MeasureStatus]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[MeasureTrack]
PlayerType=STATUS
IfCondition=MeasureStatus>0
IfTrueAction=[activate other measures...][!ActivateConfig "yourfolder\Music Spectrum" "Spectrum.ini"][show other meters...][update other meters][!Redraw]
IfCondition2=MeasureStatus=0
IfTrueAction2=[deactivate other measures][!Refresh "yourfolder\Music Spectrum"][!DeactivateConfig "yourfolder\Music Spectrum" "Spectrum.ini"][hide other meters...][update other meters][!Redraw]
dicerabbit
Posts: 2
Joined: October 29th, 2015, 2:40 pm

Re: Automatic Skin Loading to reduce CPU usage

Post by dicerabbit »

fonpaolo wrote:This is what I'm currently using:

Code: Select all

[MeasureTrack]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#Player#
PlayerType=TITLE
PlayerPath=
Substitute="":"No Title"
DisableLeadingZero=1
OnChangeAction=[!UpdateMeasureGroup TrackInfos][!UpdateMeter MeterTrack][!Redraw]

[MeasureStatus]
Measure=Plugin
Plugin=NowPlaying
PlayerName=[MeasureTrack]
PlayerType=STATUS
IfCondition=MeasureStatus>0
IfTrueAction=[activate other measures...][!ActivateConfig "yourfolder\Music Spectrum" "Spectrum.ini"][show other meters...][update other meters][!Redraw]
IfCondition2=MeasureStatus=0
IfTrueAction2=[deactivate other measures][!Refresh "yourfolder\Music Spectrum"][!DeactivateConfig "yourfolder\Music Spectrum" "Spectrum.ini"][hide other meters...][update other meters][!Redraw]
Thats exactly what I was looking for, you're awesome, that fixed my problem, thankyou :thumbup:
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Automatic Skin Loading to reduce CPU usage

Post by fonpaolo »

You're welcome. :D