It is currently May 21st, 2024, 8:12 pm

autoShow music cover when music plays and autohide it when..

Get help with creating, editing & fixing problems with skins
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

hey, why whe i use !HideFade Show , at log said Bang:Skin "Show" not found.??
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: autoShow music cover when music plays and autohide it wh

Post by MerlinTheRed »

!HideFade is a bang that operates on whole skins, not measures. You can only fade out a whole skin by it. This bang has nothing to do with Kaelri's Fade script. The fact that !HideFade etc. only works for skins is the very reason Kaelri wrote that script.

Regarding the use of the script: It seems all of the meters you want to fade out are images. As Kaelri said, just add ImageAlpha=#CoverTransparency# to all those meters you marked in red. You probably also need DynamicVariables=1 so they will change when the transparency is adjusted.

Now you have to replace all those !HideMeter and !ShowMeter bangs with something like
!CommandMeasure Transition "FadeIn('Cover', 'CoverTransparency'). You should be able to use group names as well (e.g. 'control' instead of 'Cover').

For example, you could translate this:

Code: Select all

IfAboveValue=0
IfAboveAction=!Execute [!HideMeter Show][!ShowMeterGroup Music][!ShowMeterGroup Control][!ShowMeter Hide][!Redraw]
IfBelowValue=1
IfBelowAction=!Execute [!HideMeter Hide][!HideMeterGroup Music][!HideMeterGroup Control][!ShowMeter Show][!Redraw]
into this:

Code: Select all

IfAboveValue=0
IfAboveAction=[!CommandMeasure Transition "FadeOut('Show', 'CoverTransparency')"][!CommandMeasure Transition "FadeIn('Music', 'Control', 'Hide', 'CoverTransparency')"]
IfBelowValue=1
IfBelowAction=[!CommandMeasure Transition "FadeOut('Music', 'Control', 'Hide', 'CoverTransparency')"][!CommandMeasure Transition "FadeIn('Show', 'CoverTransparency')"]
This is all from just reading Kaelri's post, so I hope I'm correct.

On a sidenote: you shouldn't "deactivate" lines of code with a minus. The correct way to add comments in Rainmeter is with a semicolon at the start of a line. Please add a ";" to the start of any line that is not part of the actual Rainmeter statements you want to use. It's better not to gamble and hope Rainmeter doesn't get confused when parsing the code.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

thnx for correcting me. I'm very just new about skinning.
ok, so, i followed as you said, i put ImageAlpha=#CoverTransparency# to all image meters that i want to fade and change the action but the log come with an error
Script: Transition.lua:239:attemp to perform arithmetic on local 'Xi' (a nil value)

here my ini.
[Rainmeter]
Author=AeriusExodus
Update=#UpdateSpeed#

[Variables]
UpdateSpeed=50

[Transition]
Measure=Script
ScriptFile=Transition.lua

[Variables]
CoverTransparency=255

[mStatus]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=iTunes
PlayerType=STATUS
IfAboveValue=0
IfAboveAction=[!CommandMeasure Transition "FadeOut('Show', 'CoverTransparency')"][!CommandMeasure Transition "FadeIn('Music', 'Control', 'Hide', 'CoverTransparency')"]
IfBelowValue=1
IfBelowAction=[!CommandMeasure Transition "FadeOut('Music', 'Control', 'Hide', 'CoverTransparency')"][!CommandMeasure Transition "FadeIn('Show', 'CoverTransparency')"]


[BG]
Meter=Image
ImageName=#CURRENTPATH#\BG.png
ImageEffect=Shadow
X=20
Y=0
UpdateDivider=(1000/#UpdateSpeed#)


[MeasureState]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=iTunes
PlayerType=STATE
Measure=Plugin;
UpdateDivider=(1000/#UpdateSpeed#)

[Player]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=iTunes
PlayerType=TITLE
DisableLeadingZero=0
UpdateDivider=(1000/#UpdateSpeed#)


[mCover]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=COVER
Substitute="":"#CURRENTPATH#\Default.png"
UpdateDivider=(1000/#UpdateSpeed#)

[mArtist]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=ARTIST
Substitute="":" "
UpdateDivider=(1000/#UpdateSpeed#)

[mPosition]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=POSITION


[mProgress]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=PROGRESS
MinValue=0
MaxValue=100
UpdateDivider=(1000/#UpdateSpeed#)

[Status]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=STATUS
UpdateDivider=(1000/#UpdateSpeed#)

[MeasureDuration]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[Player]
PlayerType=DURATION
UpdateDivider=(1000/#UpdateSpeed#)



;-----------------------------------------------------------------------------------------------------

[Show]
Meter=IMAGE
ImageName=anim0.png
X=23
Y=71
AntiAlias=1
ToolTipText=Show Music
ImageAlpha=255
LeftMouseDownAction=[!CommandMeasure Transition "FadeOut('Show', 'CoverTransparency')"][!CommandMeasure Transition "FadeIn('Music', 'Control', 'Hide', 'CoverTransparency')"]
;LeftMouseDownAction=!Execute [!ShowMeter Hides][!showMeterGroup Music][!ShowMeterGroup Control][!HideMeter Show][!Redraw]
ImageAlpha=#CoverTransparency#
DynamicVariables=1


;-----------------------------------------------------------------------------------------------------

[Hidden]
Meter=IMAGE
ImageName=Panel.png
X=r
Y=r
AntiAlias=1
Hidden=1
Group=Music
ImageAlpha=#CoverTransparency#
DynamicVariables=1

;-----------------------------------------------------------------------------------------------------

[Hide]
Meter=IMAGE
ImageName=hide.png
X=r
Y=261
AntiAlias=1
Hidden=1
ToolTipText=Hide Music
;LeftMouseDownAction=[!HideFade Hides][!Redraw]
LeftMouseDownAction=[!CommandMeasure Transition "FadeOut('Music', 'Control', 'Hide', 'CoverTransparency')"][!CommandMeasure Transition "FadeIn('Show', 'CoverTransparency')"]
DynamicVariables=1
ImageAlpha=#CoverTransparency#


-----------------------------------------------------------------------------
---Music----

[Cover]
Meter=IMAGE
MeasureName=mCover
X=26
Y=108
W=150
H=150
SolidColor=FFFFFF10
Hidden=1
Group=Music
DynamicVariables=1
ImageAlpha=#CoverTransparency#

[Overlay]
Meter=Image
ImageName=backcoveroverlay.png
X=r
Y=r
W=150
H=150
Hidden=1
Group=Music
DynamicVariables=1
ImageAlpha=#CoverTransparency#



[Bar]
Meter=Bar
MeasureName=mProgress
BarImage=Fill.png
X=55
Y=85
W=91
H=7
Hidden=1
Group=Music
BarOrientation=HORIZONTAL
DynamicVariables=1
ImageAlpha=#CoverTransparency#

[Knob]
Meter=Image
;ImageName=
SolidColor=75a534
W=4
H=3
X=(54+(87 *([mProgress] / 100)))
Y=87
Hidden=1
Group=Music
DynamicVariables=1
ImageAlpha=#CoverTransparency#

---------------------------------------------------------------------

--------ARTIST and TRACK------------

[Artist]
Meter=String
MeasureName=mArtist
X=100
Y=38
W=150
H=15
FontFace=Segoe UI Light
FontSize=9
FontColor=363636
StringStyle=Bold
;StringEffect=Shadow
ClipString=1
AntiAlias=1
Text="%1"
StringAlign=Center
UpdateDivider=(1000/#UpdateSpeed#)

[Track]
Meter=STRING
MeasureName=Player
X=r
Y=15r
W=150
H=15
FontSize=8
FontFace=Segoe UI Light
FontColor=363636
;StringEffect=Shadow
ClipString=1
AntiAlias=1
Text="%1"
StringAlign=Center
UpdateDivider=(1000/#UpdateSpeed#)


-----------------------------------------------------------------------------
---CONTROL----

[Next]
Meter=Image
ImageName=next.png
X=182
Y=78
Hidden=1
Group=Control
ToolTipText=Next
MouseOverAction=!Execute [!SetOption #CURRENTSECTION# ImageName "next1.png"][!Update]
MouseLeaveAction=!Execute [!SetOption #CURRENTSECTION# ImageName "next.png"][!Update]
LeftMouseUpAction=!Execute [!RainmeterPluginBang "Player Next"][!ShowMeterGroup Control][!Redraw]
ImageAlpha=#CoverTransparency#

[Previous]
Meter=Image
ImageName=prev.png
X=4
Y=r
Hidden=1
Group=Control
ToolTipText=Previous
MouseOverAction=!Execute [!SetOption #CURRENTSECTION# ImageName "prev1.png"][!Update]
MouseLeaveAction=!Execute [!SetOption #CURRENTSECTION# ImageName "prev.png"][!Update]
LeftMouseUpAction=!Execute [!RainmeterPluginBang "Player Previous"][!ShowMeterGroup Control][!SetOption #CURRENTSECTION# ImageName "prev1.png"][!Update][!Redraw]
ImageAlpha=#CoverTransparency#

------------------------------------------

[Elapsed]
Meter=STRING
MeasureName=mPosition
X=102
Y=-2
W=100
H=40
StringAlign=CENTER
;StringStyle=Bold
FontFace=Segoe UI Light
FontSize=22
FontColor=303030
AntiAlias=1
ClipString=1
Text="%1"
Substitute="":" "
UpdateDivider=(1000/#UpdateSpeed#)
is it correct?
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: autoShow music cover when music plays and autohide it wh

Post by MerlinTheRed »

Looks fine to me. Kaelri will have to jump in here.

By the way: !RainmeterPluginBang is deprecated and should now be !CommandMeasure. !Execute is deprecated since not too long ago and you can now just remove it and everything will still work.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: autoShow music cover when music plays and autohide it wh

Post by Kaelri »

Most of it looks right. There's just one small thing: for transition commands, when you're targeting multiple meters, they all need to be within the same parameter (inside the quotes). So where you have

Code: Select all

FadeOut('Music', 'Control', 'Hide', 'CoverTransparency')
it should be

Code: Select all

FadeOut('Music, Control, Hide', 'CoverTransparency')
etc.

You also forgot

Code: Select all

UpdateDivider=(1000/#UpdateSpeed#)
on a few sections, but this shouldn't stop the transition from working. :)
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

still got same error in log.
i suggest you to take a look.
Narrow_-test-.rmskin
You do not have the required permissions to view the files attached to this post.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: autoShow music cover when music plays and autohide it wh

Post by Kaelri »

I corrected the following problems:

- You did not apply the instructions in my previous post to the whole skin. ;)
- The script in Transition.lua had been edited in a way that caused the transition to break. I restored the original version from this thread.
- You were using the same transparency variable for the "Show" and "Hide/Control/Music" groups. Since you want these to be two different transparencies (100% and 0%), you need to use separate variables.

I also cleaned up some deprecated functions and redundant measures. It looks like it's mostly working now; you'll just need to add some stray meters to one of your meter groups.
You do not have the required permissions to view the files attached to this post.
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

THANK YOU! thanx for everything.manage to made it.

i only disable the ImageAlpha=255 cause when player shows the [Show] does not fadeout.

but, i the [knob] seems to not fade out with the other meters.What could be the problem?
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: autoShow music cover when music plays and autohide it wh

Post by KreAch3R »

Maybe this is the problem? Check the meter groups.
Kaelri wrote:you'll just need to add some stray meters to one of your meter groups.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
apit23
Posts: 43
Joined: August 17th, 2012, 9:06 am

Re: autoShow music cover when music plays and autohide it wh

Post by apit23 »

But, i put the [knob] in Group=music.
Is that what you mean?