;the refresh rate of the skin is 20 milliseconds.
;the slow down variable is here to cacht when measure is changed
;this measure change every second. but refreshed 20 milliseconds.
;we need this because we want the possibility rewrite this part of the skin.
;when the measure is realy changed we set variable so we can use if condition
OnChangeAction=[!SetVariable vSlowDown 2]
;slow down is now in action. and will make it possible to set options and variables.
IfCondition=(#vSwitch# + #vSlowDown#) = 3
IfTrueAction=[!SetVariable vSlowDown 0][!SetOption MeterText Text "One"][!SetVariable vSwitch 0]
IfCondition2=(#vSwitch# + #vSlowDown#) = 2
IfTrueAction2=[!SetVariable vSlowDown 0][!SetOption MeterText Text "Two"][!SetVariable vSwitch 1]
;when we are done with setting options and variables we undo the slowdown part and is back waiting agian for real changes.
Shape=Rectangle , , 200, 100
Text="Waiting On Change"
You do not have the required permissions to view the files attached to this post.
; This should not be changed manually. If changed, must be in Range [1,3].
; Using Calc measure so I can change it at will.
; Every update, it switches between 0 and 1, so that we can execute OnChangeAction
; UpdateDivider is set to -1, so it's independent of skin's Update cycle.
; Now I update the measure in an interval of milliseconds provided in the variable. It gives us an upper hand
; in comparison to Time measure. Since we can control the interval.
OnUpdateAction=[!Delay (#SlowDownTimeInMilliSeconds#)][!UpdateMeasure #CURRENTSECTION#]
; Then come the switches. Go wild.
IfTrueAction=[!SetOption MeterText Text "I am SwitchCase1"][!SetVariable vSwitch 2]
IfTrueAction2=[!SetOption MeterText Text "I am SwitchCase2"][!SetVariable vSwitch 3]
IfTrueAction3=[!SetOption MeterText Text "I am SwitchCase3"][!SetVariable vSwitch 1]
Text=I am SwitchOutput
sl23 wrote: ↑September 4th, 2021, 5:54 pm
What does it do? A description would be useful
in this case i used the timer plugin. in real situation i used the nowplaying plugin and the webnowplaying plugin.
when the cover changed i need to know if spotify is selected or one of the others like winamp or media player.
the cover picture is send to my exe file. and that is heave duty cause i see my mouse changing in the waiting icon every second.
so i build this to realease the presure and only being used when the picture is realy changing.
if spotify is selected send the spotify cover. and if not then send the winamp (nowplaying) cover.
so i used the timer plugin so you can test it right away. without having to install other files or things.
i set the update rate on 20. just to see that it is only doing something heavy when there is something realy changed.
death.crafter wrote: ↑September 5th, 2021, 2:31 pm
Okay, I was wrong. !Delay bangs persist even after Skin is refreshed. So the !UpdateMeasure bang before Refresh is executed post refresh, breaking the update cycle.