It is currently October 20th, 2019, 8:17 pm

Looking to be pointed in the right direction

Help with creating, editing & fixing problems with skins
Ferbstorm
Posts: 36
Joined: March 9th, 2019, 12:50 am

Re: Looking to be pointed in the right direction

Ferbstorm » March 21st, 2019, 6:08 am

Okay, yet another question. I'm trying to get something to open an incognito window in Chrome. When I write ["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe "] in my bang, it works completely fine and opens chrome no problem. But when I use ["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -incognito"] instead, to try and get it to open it incognito, it doesn't work. According to the internet this is how you do the same thing with a regular desktop shortcut, there shouldn't be any difference here, right?
User avatar
jsmorley
Developer
Posts: 19591
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Looking to be pointed in the right direction

jsmorley » March 21st, 2019, 10:59 am

LeftMouseUpAction=["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "-incognito"]
Ferbstorm
Posts: 36
Joined: March 9th, 2019, 12:50 am

Re: Looking to be pointed in the right direction

Ferbstorm » March 21st, 2019, 11:59 am

Thanks! It's much appreciated. Is there a way to make it open the window at a specific size and location?
User avatar
jsmorley
Developer
Posts: 19591
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Looking to be pointed in the right direction

jsmorley » March 21st, 2019, 12:09 pm

Ferbstorm wrote:
March 21st, 2019, 11:59 am
Thanks! It's much appreciated. Is there a way to make it open the window at a specific size and location?
Not within Rainmeter. I have no idea what command line options Chrome offers, or if there are 3rd-party utilities that can do that. Of course Chrome will open in the same position and size you last closed it at.
Ferbstorm
Posts: 36
Joined: March 9th, 2019, 12:50 am

Re: Looking to be pointed in the right direction

Ferbstorm » March 25th, 2019, 8:17 am

Running into a few other issues. I'm setting up a music player for myself, and I'm a little stuck on a few fronts.

First, I want it set up so when I click on the player it will open Musicbee. As of right now, I'm using LeftMouseUpAction=[!CommandMeasure MeasurePlayer "OpenPlayer"]. Unfortunately, this doesn't do what I want. If Musicbee is completely closed, it'll open it just fine. But if Musicbee is just minimized, it just makes the taskbar icon flash. I want it to maximize musicbee if it's minimized, and open it if it's not already running. Am I missing something really obvious here?

Second, I've got it set up so a background and the track info text only show up when my mouse hovers over the player, but it's a bit abrupt. I know how to fade in another skin, but is there a way to fade in specific meters? I'm not seeing anything on how to make that work out.

Third, when the background is faded in, its edge is a little bit abrupt. Is there a way to blur it around the edges? I'll admit, I haven't really looked that hard for this one, but I've been screwing around with the transparencies and colors for a while now and it's just not coming together

Here's my full code if you need it. It's pretty messy, as I was trying to set everything up to scale off of a few variables and the math got a little too difficult for me, but I've tried to clean it up as best I can.

Thanks in advance for any help I get

Code: Select all

[Rainmeter]
Update=250
MouseActionCursor=0


[Variables]

;Sizing;

Angle2=15

BarWidthV=4
BarWidthP=5
BarLength=400
BarBGLength=(#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))
FontSize=13
ButtonSize=25
ButtonSize2=30
ButtonSize3=(#ButtonSize2#-10)
ButtonPadding=5
ButtonPadding2=25
VertPadding=5
HorzPadding=30

;Color;

BaseBG=50,125,50,1
BaseBG2=50,125,50,90
ButtonBase=40,80,40,20
ButtonBase2=10,50,10,200
StrokeColor=10,50,10,255
TextBG=50,125,50,70
BarBase=10,50,10,200
FontColor=10,50,10,255
FontColor2=#FontColor#
BorderColor=40,180,40,120
TextEffect=none
FontWeight=550
BarOverV=10,50,10,200
BarOverP=10,50,10,255

;Spacing;

BGPad=100

BarYP=#VertPadding#
BarYV=(#BarYP#-#BarWidthV#)
TextY=(#BarYP#+#BarWidthP#+5)
TextX=(((#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))/2)+30)
ArtistX=#TextX#+5
TrackX=#TextX#-5

A=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)+#BGPad#)*Cos(Rad(#Angle2#)))
A2=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2))*Cos(Rad(#Angle2#)))
B=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)+#BGPad#)*Sin(Rad(#Angle2#)))
B2=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2))*Sin(Rad(#Angle2#)))

TX=(#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)-((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)*Cos(Rad(#Angle2#)))
TXM=#TX#+9
TY=-15

ButtonY=64
ButtonY2=22
ButtonY3=17
ButtonY4=22

ButtonX=(#A#+#TX#)-(#A2#*(1/8))+8
ButtonX2=(#A#+#TX#)-(#A2#*(3/8))+(#ButtonSize2#+0)
ButtonX3=(#A#+#TX#)-(#A2#*(2/8))
ButtonX4=(#A#+#TX#)-(#A2#*(1/8)+0)

Matrix1=(cos(Rad(#Angle2#)));(sin(Rad(#Angle2#)));(-sin(Rad(#Angle2#)));(cos(Rad(#Angle2#)));(#TXM#+#BGPad#);#TY#
Matrix2=(cos(Rad(#Angle2#)));(sin(Rad(#Angle2#)));(-sin(Rad(#Angle2#)));(cos(Rad(#Angle2#)));0;(-(#B2#)+10)

;Miscellaneous;

Play=1
Pause=0


;=================================================================================;

[MeasurePlayer]
Measure=NowPlaying
PlayerName=CAD
PlayerType=Artist

[MeasureTitle]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Title

[MeasureAlbum]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Album

[MeasureAlbumArt]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Cover

[MeasureProgress]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Progress

[MeasurePosition]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Position

[MeasureDuration]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Duration

[MeasureVolume]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Volume

[MeasureState]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=State
IfCondition=MeasureState = 1
IfCondition2=(MeasureState = 0) || (MeasureState = 2)
IfTrueAction=[!SetVariable Play 1][!SetVariable Pause 0][!update]
IfTrueAction2=[!SetVariable Play 0][!SetVariable Pause 1][!update]

[ProgCap]
Measure=Calc
Formula=MeasureProgress

[ProgCap1]
Measure=Calc
Formula=ProgCap*((#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))/100)+(#HorzPadding#-2)

[ProgCap2]
Measure=Calc
Formula=ProgCap1+(#BarWidthP#/(Tan(Rad(#Angle2#))))

[VolCap]
Measure=Calc
Formula=MeasureVolume

[VolCap1]
Measure=Calc
Formula=#BarLength#-VolCap*(#BarLength#/100)+(#BarWidthP#/(Tan(Rad(#Angle2#))))+(#HorzPadding#-4)

[VolCap2]
Measure=Calc
Formula=VolCap1-(#BarWidthP#/(Tan(Rad(#Angle2#))))

[MeasureFade]
Measure=Plugin
Plugin=ActionTimer
ActionList1=


;=================================================================================;


[BackGround]
Meter=Shape
Shape=Path BG | Extend BGMod
BG= (#TX#),0 | LineTo (#A#+#TX#),0 | LineTo (#A#+#TX#),(#B#) | ClosePath 1
BGMod=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BaseBG#
BGMod2=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BaseBG2#
MouseOverAction=[!ShowMeterGroup Hover][!ShowMeter TrackInfoArtist][!ShowMeter TrackInfoTrack][!ShowMeter TextBG][!SetOption Background Shape "Path BG | Extend BGMod2"][!Update][!Redraw]
MouseLeaveAction=[!HideMeterGroup Hover][!HideMeter TrackInfoArtist][!HideMeter TrackInfoTrack][!HideMeter TextBG][!SetOption Background Shape "Path BG | Extend BGMod"][!Update][!Redraw]
MouseScrollUpAction=[!CommandMeasure MeasurePlayer "SetVolume +5"][!Update]
MouseScrollDownAction=[!CommandMeasure MeasurePlayer "SetVolume -5"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer "OpenPlayer"]

[TextBG]
Meter=Shape
Shape=Path TextBG | StrokeWidth 0 | FillColor #TextBG#
TextBG= (#TX#),0 | LineTo 160,0 | LineTo (#A#+#TX#),107 | LineTo (#A#+#TX#),(#B#) | ClosePath 1
Hidden=1


[Volume]
Meter=Bar
MeasureName=MeasureVolume
BarOrientation=Horizontal
BarColor=#BarOverV#
Flip=1
Y=#BarYV#
X=(#HorzPadding#+(#BarWidthV#/(Tan(Rad(#Angle2#)))))
H=#BarWidthV#
W=#BarLength#+30
Group=Hover
Hidden=1
TransformationMatrix=#Matrix1#

[VolumeCap]
Meter=Shape
DynamicVariables=1
Shape=Path VolCap | Extend CapMod
VolCap=[VolCap1],[Volume:Y] | LineTo [VolCap1],([Volume:Y]+#BarWidthV#) | LineTo [VolCap2],([Volume:Y]+#BarWidthV#) |ClosePath 1
CapMod=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BarOverV#
Group=Hover
Hidden=1
TransformationMatrix=#Matrix1#

[TrackInfoArtist]
Meter=String
MeasureName=MeasurePlayer
MeasureName2=MeasureTitle
X=(#TextX#-240)
Y=#TextY#
StringEffect=#TextEffect#
FontEffectColor=#BorderColor#
FontColor=#FontColor2#
FontSize=#FontSize#
FontWeight=#FontWeight#
StringAlign=LeftTop
Group=GroupOne
Text=" %1  "
Hidden=1
Group=Hover
TransformationMatrix=#Matrix1#

[TrackInfoTrack]
Meter=String
MeasureName=MeasurePlayer
MeasureName2=MeasureTitle
X=(#TextX#+200)
Y=#TextY#
StringEffect=#TextEffect#
FontEffectColor=#BorderColor#
FontColor=#FontColor#
FontSize=#FontSize#
FontWeight=#FontWeight#
StringAlign=RightTop
Group=GroupOne
Text=" %2"
Hidden=1
Group=Hover
TransformationMatrix=#Matrix1#

[ProgressBar]
Meter=Bar
MeasureName=MeasureProgress
BarOrientation=Horizontal
BarColor=#BarOverP#
X=(#HorzPadding#)
Y=#BarYP#
H=#BarWidthP#
W=(#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))
Group=GroupOne
TransformationMatrix=#Matrix1#

[ProgressBarBG]
Meter=Image
UpdateDivider=-1
SolidColor=#BarBase#
X=#HorzPadding#
Y=#BarYP#
H=(#BarWidthP#/2)
W=#BarBGLength#
Group=GroupOne
TransformationMatrix=#Matrix1#

[ProgressBarCap]
Meter=Shape
DynamicVariables=1
Shape=Path ProgCap | Extend CapMod
Shape2=Path ProgCapStart | Extend Capmod
ProgCap= [ProgCap1],[ProgressBar:Y] | LineTo [ProgCap1],([ProgressBar:Y]+#BarWidthP#) | LineTo [ProgCap2],[ProgressBar:Y] | ClosePath 1
ProgCapStart= ([ProgressBar:X]+1),[ProgressBar:Y] | LineTo ([ProgressBar:X]+1),([ProgressBar:Y]+#BarWidthP#) | LineTo ([ProgressBar:X]-(#BarWidthP#/Tan(Rad(#Angle2#)))+1),([ProgressBar:Y]+#BarWidthP#)
CapMod=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BarOverP#
TransformationMatrix=#Matrix1#

;=================================================================================;

[Play]
Meter=Shape
X=#ButtonX3#
Y=#ButtonY3#
ShapePlay=Combine Shape | Union Shape2
Shape= Path Play | Extend Modifier
Shape2=Rectangle 0,0,#ButtonSize2#,#ButtonSize2# | StrokeWidth 0 | FillColor 0,0,0,1
Play= 0,0 | LineTo 0,#ButtonSize2# | LineTo #ButtonSize2#,(#ButtonSize2#/2) | ClosePath 1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
TransformationMatrix=#Matrix2#
DynamicVariables=1
Hidden=#Play#
Group=GroupOne

[PlayAction]
Meter=Shape
DynamicVariables=1
X=(#ButtonX3#-9)
Y=(#ButtonY3#+23)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
Hidden=#Play#
MouseOverAction=[!SetOption Play Shape "Path Play | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Play Shape "Path Play | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Play][!update][!Refresh]



[Pause]
Meter=Shape
X=#ButtonX3#
Y=#ButtonY3#
ShapePause=Combine Shape | Union Shape2 | Union Shape3
Shape=Rectangle 0,0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier
Shape2=Rectangle ((#ButtonSize2#/3)*2),0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier
Shape3=Rectangle 0,0,#ButtonSize2#,#ButtonSize2# | StrokeWidth 0 | FillColor 0,0,0,1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
DynamicVariables=1
Hidden=#Pause#
TransformationMatrix=#Matrix2#

[PauseAction]
Meter=Shape
DynamicVariables=1
X=(#ButtonX3#-9)
Y=(#ButtonY3#+23)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
Hidden=#Pause#
MouseOverAction=[!SetOption Pause Shape "Rectangle 0,0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier2"][!SetOption Pause Shape2 "Rectangle ((#ButtonSize2#/3)*2),0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Pause Shape "Rectangle 0,0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier"][!SetOption Pause Shape2 "Rectangle ((#ButtonSize2#/3)*2),0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Pause][!update][!Refresh]



[Next]
Meter=Shape
X=#ButtonX4#
Y=#ButtonY4#
ShapeNext=Combine Shape | Union Shape2 | Union Shape3
Shape=Path Next | Extend Modifier
Shape2=Path Next2 | Extend Modifier
Shape3=Rectangle 0,0,(#ButtonSize3#*2),#ButtonSize3# | StrokeWidth 0 | FillColor 0,0,0,1
Next= 0,0 | LineTo 0,#ButtonSize3# | LineTo #ButtonSize3#,(#ButtonSize3#/2) | ClosePath 1
Next2= #ButtonSize3#,0 | LineTo #ButtonSize3#,#ButtonSize3# | LineTo (#ButtonSize3#*2),(#ButtonSize3#/2) | ClosePath 1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
Group=GroupOne
TransformationMatrix=#Matrix2#

[NextAction]
Meter=Shape
X=(#ButtonX4#-8)
Y=(#ButtonY4#+33)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
MouseOverAction=[!SetOption Next Shape "Path Next | Extend Modifier2"][!SetOption Next Shape2 "Path Next2 | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Next Shape "Path Next | Extend Modifier"][!SetOption Next Shape2 "Path Next2 | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Next][!update][!Refresh]



[Previous]
Meter=Shape
X=#ButtonX2#
Y=#ButtonY2#
ShapePrev=Combine Shape | Union Shape2 | Union Shape3
Shape=Path Prev | Extend Modifier
Shape2=Path Prev2 | Extend Modifier
Shape3=Rectangle 0,0,(-(#ButtonSize3#*2)),#ButtonSize3# | StrokeWidth 0 | FillColor 0,0,0,1
Prev= 0,0 | LineTo 0,#ButtonSize3# | LineTo (-#ButtonSize3#),(#ButtonSize3#/2) | ClosePath 1
Prev2= (-#ButtonSize3#),0 | LineTo (-#ButtonSize3#),#ButtonSize3# | LineTo (-(#ButtonSize3#*2)),(#ButtonSize3#/2) | ClosePath 1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
Group=GroupOne
TransformationMatrix=#Matrix2#

[PrevAction]
Meter=Shape
X=(#ButtonX2#-40)
Y=(#ButtonY2#+3)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
MouseOverAction=[!SetOption Previous Shape "Path Prev | Extend Modifier2"][!SetOption Previous Shape2 "Path Prev2 | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Previous Shape "Path Prev | Extend Modifier"][!SetOption Previous Shape2 "Path Prev2 | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Previous][!update][!Refresh]

Yincognito
Posts: 658
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 25th, 2019, 2:44 pm

Ferbstorm wrote:
March 25th, 2019, 8:17 am
If Musicbee is completely closed, it'll open it just fine. But if Musicbee is just minimized, it just makes the taskbar icon flash. I want it to maximize musicbee if it's minimized, and open it if it's not already running. Am I missing something really obvious here?

Second, I've got it set up so a background and the track info text only show up when my mouse hovers over the player, but it's a bit abrupt. I know how to fade in another skin, but is there a way to fade in specific meters? I'm not seeing anything on how to make that work out.

Third, when the background is faded in, its edge is a little bit abrupt. Is there a way to blur it around the edges? I'll admit, I haven't really looked that hard for this one, but I've been screwing around with the transparencies and colors for a while now and it's just not coming together

Here's my full code if you need it. It's pretty messy, as I was trying to set everything up to scale off of a few variables and the math got a little too difficult for me, but I've tried to clean it up as best I can.
First question: you might want to investigate using the RunCommand plugin to run a command line along the lines of start /max winamp (I used winamp here, since this is my music player, but it might work with Musicbee as well). If that doesn't work, you might want to check Musicbee's documentation and see if there is a command line (or parameters that you can start Musicbee with) that can instruct it to start maximized, and then use the above RunCommand method to do what you aim for. The above command works for me as it opens up winamp even if it's minimized in the notification area or the taskbar. Just use the example at the bottom of the webpage I linked to, and replace wmic cpu get Name with the start /max winamp equivalent for Musicbee, see if it's working and then adapt it to your specific needs.

Second question: As far as I know, you can't fade individual meters. There are some options like ImageTint, ImageAlpha or ColorMatrix that you can play with if your meter is an image meter, and there's also the possibility of dynamically modifying the colors (meter background, font color, etc.) for other types of meters, but these methods would require having a very low update rate in your skin, in order for the color/alpha modifications to happen every couple of milliseconds, so that the visual effect on the meter is similar to a quick fade. You have a way of doing it here, with the drawbacks I already mentioned. There is also the possibility of using frames for the image, like using this, but I'm not sure if that would achieve the desired result. Bottom line, I think this would create more problems than it solves.

Third question: I'm not sure if this would help, but a quick look at ScaleMargins to see if it suits your goal won't hurt. Other than that, what I would do is just photoshop the background to either add that blur near its edges or crop the edges out and be done with it. Another option would be to draw a Shape meter on the edges that simulates the blur. Of course, the Shape meter does not feature blur among its features, but maybe a Shape that "darkens"/fades out the edges when drawn over the background would help make the edges a little less "abrupt".
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Looking to be pointed in the right direction

eclectic-tech » March 25th, 2019, 3:16 pm

Re: Fading meters

The skin update rate has no effect on the speed of your ActionTimer; that was one of the main reasons it was developed.

I finished adding the ActionTimer measure you started adding to your code. It will change the value of a new variable "Alpha1" using 2 action lists: one to change it from 0 to 255 and a second list to change it from 255 to 0. You can then use that variable and measure values to control the visibility and fadein/fadeout speed of any meter.

You have to remove predefined alpha values from any color variables that are used in meters you want to fade in/out. Then add the #Alpha1# variable as the alpha value to the colors in those meters. You can use a formula for the alpha value, if you do not want fully opaque/transparent values.

Using the #Alph1# value eliminates the need to hide/show meter groups, so do change all meters to Hidden=0

I added the necessary code and variables that should help get you started.

Code: Select all

[Rainmeter]
Update=250
MouseActionCursor=0


[Variables]
Alpha1=0
U=[!UpdateMeasure MeasureFade][!UpdateMeter *][!Redraw]
;Sizing;

Angle2=15

BarWidthV=4
BarWidthP=5
BarLength=400
BarBGLength=(#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))
FontSize=13
ButtonSize=25
ButtonSize2=30
ButtonSize3=(#ButtonSize2#-10)
ButtonPadding=5
ButtonPadding2=25
VertPadding=5
HorzPadding=30

;Color;

BaseBG=50,125,50
;,1
BaseBG2=50,125,50
;,90
ButtonBase=40,80,40,20
ButtonBase2=10,50,10,200
StrokeColor=10,50,10,255
TextBG=50,125,50
;70
BarBase=10,50,10,200
FontColor=10,50,10
;,255
FontColor2=#FontColor#
BorderColor=40,180,40
;120
TextEffect=none
FontWeight=550
BarOverV=10,50,10
;200
BarOverP=10,50,10,255

;Spacing;

BGPad=100

BarYP=#VertPadding#
BarYV=(#BarYP#-#BarWidthV#)
TextY=(#BarYP#+#BarWidthP#+5)
TextX=(((#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))/2)+30)
ArtistX=#TextX#+5
TrackX=#TextX#-5

A=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)+#BGPad#)*Cos(Rad(#Angle2#)))
A2=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2))*Cos(Rad(#Angle2#)))
B=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)+#BGPad#)*Sin(Rad(#Angle2#)))
B2=(((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2))*Sin(Rad(#Angle2#)))

TX=(#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)-((#BarBGLength#+(#BarWidthP#/(Tan(Rad(#Angle2#))))*2)*Cos(Rad(#Angle2#)))
TXM=#TX#+9
TY=-15

ButtonY=64
ButtonY2=22
ButtonY3=17
ButtonY4=22

ButtonX=(#A#+#TX#)-(#A2#*(1/8))+8
ButtonX2=(#A#+#TX#)-(#A2#*(3/8))+(#ButtonSize2#+0)
ButtonX3=(#A#+#TX#)-(#A2#*(2/8))
ButtonX4=(#A#+#TX#)-(#A2#*(1/8)+0)

Matrix1=(cos(Rad(#Angle2#)));(sin(Rad(#Angle2#)));(-sin(Rad(#Angle2#)));(cos(Rad(#Angle2#)));(#TXM#+#BGPad#);#TY#
Matrix2=(cos(Rad(#Angle2#)));(sin(Rad(#Angle2#)));(-sin(Rad(#Angle2#)));(cos(Rad(#Angle2#)));0;(-(#B2#)+10)

;Miscellaneous;

Play=1
Pause=0


;=================================================================================;

[MeasurePlayer]
Measure=NowPlaying
PlayerName=CAD
PlayerType=Artist

[MeasureTitle]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Title

[MeasureAlbum]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Album

[MeasureAlbumArt]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Cover

[MeasureProgress]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Progress

[MeasurePosition]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Position

[MeasureDuration]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Duration

[MeasureVolume]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=Volume

[MeasureState]
Measure=NowPlaying
PlayerName=[MeasurePlayer]
PlayerType=State
IfCondition=MeasureState = 1
IfCondition2=(MeasureState = 0) || (MeasureState = 2)
IfTrueAction=[!SetVariable Play 1][!SetVariable Pause 0][!update]
IfTrueAction2=[!SetVariable Play 0][!SetVariable Pause 1][!update]

[ProgCap]
Measure=Calc
Formula=MeasureProgress

[ProgCap1]
Measure=Calc
Formula=ProgCap*((#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))/100)+(#HorzPadding#-2)

[ProgCap2]
Measure=Calc
Formula=ProgCap1+(#BarWidthP#/(Tan(Rad(#Angle2#))))

[VolCap]
Measure=Calc
Formula=MeasureVolume

[VolCap1]
Measure=Calc
Formula=#BarLength#-VolCap*(#BarLength#/100)+(#BarWidthP#/(Tan(Rad(#Angle2#))))+(#HorzPadding#-4)

[VolCap2]
Measure=Calc
Formula=VolCap1-(#BarWidthP#/(Tan(Rad(#Angle2#))))

[MeasureFade]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat FadeIn,10,52
ActionList2=Repeat FadeOut,10,52
FadeIn=[!SetVariable Alpha1 (Clamp(#Alpha1#+5,0,255))]#U#
FadeOut=[!SetVariable Alpha1 (Clamp(#Alpha1#-5,0,255))]#U#
DynamicVariables=1

;=================================================================================;


[BackGround]
Meter=Shape
Shape=Path BG | Extend BGMod
BG= (#TX#),0 | LineTo (#A#+#TX#),0 | LineTo (#A#+#TX#),(#B#) | ClosePath 1
BGMod=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BaseBG#,(#Alpha1#*0.3)
BGMod2=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BaseBG2#,(#Alpha1#*0.3)
MouseOverAction=[!CommandMeasure MeasureFade "Stop 1"][!CommandMeasure MeasureFade "Stop 2"][!CommandMeasure MeasureFade "Execute 1"]
;[!ShowMeterGroup Hover][!ShowMeter TrackInfoArtist][!ShowMeter TrackInfoTrack][!ShowMeter TextBG][!SetOption Background Shape "Path BG | Extend BGMod2"][!Update][!Redraw]
MouseLeaveAction=[!CommandMeasure MeasureFade "Stop 1"][!CommandMeasure MeasureFade "Stop 2"][!CommandMeasure MeasureFade "Execute 2"]
;[!HideMeterGroup Hover][!HideMeter TrackInfoArtist][!HideMeter TrackInfoTrack][!HideMeter TextBG][!SetOption Background Shape "Path BG | Extend BGMod"][!Update][!Redraw]
MouseScrollUpAction=[!CommandMeasure MeasurePlayer "SetVolume +5"][!Update]
MouseScrollDownAction=[!CommandMeasure MeasurePlayer "SetVolume -5"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer "OpenPlayer"]
DynamicVariables=1

[TextBG]
Meter=Shape
Shape=Path TextBG | StrokeWidth 0 | FillColor #TextBG#,(#Alpha1#*0.3)
TextBG= (#TX#),0 | LineTo 160,0 | LineTo (#A#+#TX#),107 | LineTo (#A#+#TX#),(#B#) | ClosePath 1
Hidden=0
DynamicVariables=1


[Volume]
Meter=Bar
MeasureName=MeasureVolume
BarOrientation=Horizontal
BarColor=#BarOverV#,(#Alpha1#*0.65)
Flip=1
Y=#BarYV#
X=(#HorzPadding#+(#BarWidthV#/(Tan(Rad(#Angle2#)))))
H=#BarWidthV#
W=#BarLength#+30
Group=Hover
Hidden=0
TransformationMatrix=#Matrix1#
DynamicVariables=1

[VolumeCap]
Meter=Shape
DynamicVariables=1
Shape=Path VolCap | Extend CapMod
VolCap=[VolCap1],[Volume:Y] | LineTo [VolCap1],([Volume:Y]+#BarWidthV#) | LineTo [VolCap2],([Volume:Y]+#BarWidthV#) |ClosePath 1
CapMod=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BarOverV#,(#Alpha1#*0.65)
Group=Hover
Hidden=0
TransformationMatrix=#Matrix1#
DynamicVariables=1

[TrackInfoArtist]
Meter=String
MeasureName=MeasurePlayer
MeasureName2=MeasureTitle
X=(#TextX#-240)
Y=#TextY#
StringEffect=#TextEffect#
FontEffectColor=#BorderColor#,(#Alpha1#*0.4)
FontColor=#FontColor2#,#Alpha1#
FontSize=#FontSize#
FontWeight=#FontWeight#
StringAlign=LeftTop
Group=GroupOne
Text=" %1  "
Hidden=0
Group=Hover
TransformationMatrix=#Matrix1#
DynamicVariables=1

[TrackInfoTrack]
Meter=String
MeasureName=MeasurePlayer
MeasureName2=MeasureTitle
X=(#TextX#+200)
Y=#TextY#
StringEffect=#TextEffect#
FontEffectColor=#BorderColor#,(#Alpha1#*0.4)
FontColor=#FontColor#,#Alpha1#
FontSize=#FontSize#
FontWeight=#FontWeight#
StringAlign=RightTop
Group=GroupOne
Text=" %2"
Hidden=0
Group=Hover
TransformationMatrix=#Matrix1#
DynamicVariables=1

[ProgressBar]
Meter=Bar
MeasureName=MeasureProgress
BarOrientation=Horizontal
BarColor=#BarOverP#
X=(#HorzPadding#)
Y=#BarYP#
H=#BarWidthP#
W=(#BarLength#+(#BarWidthP#/(Tan(Rad(#Angle2#)))))
Group=GroupOne
TransformationMatrix=#Matrix1#

[ProgressBarBG]
Meter=Image
UpdateDivider=-1
SolidColor=#BarBase#
X=#HorzPadding#
Y=#BarYP#
H=(#BarWidthP#/2)
W=#BarBGLength#
Group=GroupOne
TransformationMatrix=#Matrix1#

[ProgressBarCap]
Meter=Shape
DynamicVariables=1
Shape=Path ProgCap | Extend CapMod
Shape2=Path ProgCapStart | Extend Capmod
ProgCap= [ProgCap1],[ProgressBar:Y] | LineTo [ProgCap1],([ProgressBar:Y]+#BarWidthP#) | LineTo [ProgCap2],[ProgressBar:Y] | ClosePath 1
ProgCapStart= ([ProgressBar:X]+1),[ProgressBar:Y] | LineTo ([ProgressBar:X]+1),([ProgressBar:Y]+#BarWidthP#) | LineTo ([ProgressBar:X]-(#BarWidthP#/Tan(Rad(#Angle2#)))+1),([ProgressBar:Y]+#BarWidthP#)
CapMod=StrokeWidth 0 | StrokeColor 0,0,0,255 | FillColor #BarOverP#
TransformationMatrix=#Matrix1#

;=================================================================================;

[Play]
Meter=Shape
X=#ButtonX3#
Y=#ButtonY3#
ShapePlay=Combine Shape | Union Shape2
Shape= Path Play | Extend Modifier
Shape2=Rectangle 0,0,#ButtonSize2#,#ButtonSize2# | StrokeWidth 0 | FillColor 0,0,0,1
Play= 0,0 | LineTo 0,#ButtonSize2# | LineTo #ButtonSize2#,(#ButtonSize2#/2) | ClosePath 1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
TransformationMatrix=#Matrix2#
DynamicVariables=1
Hidden=#Play#
Group=GroupOne

[PlayAction]
Meter=Shape
DynamicVariables=1
X=(#ButtonX3#-9)
Y=(#ButtonY3#+23)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
Hidden=#Play#
MouseOverAction=[!SetOption Play Shape "Path Play | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Play Shape "Path Play | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Play][!update][!Refresh]



[Pause]
Meter=Shape
X=#ButtonX3#
Y=#ButtonY3#
ShapePause=Combine Shape | Union Shape2 | Union Shape3
Shape=Rectangle 0,0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier
Shape2=Rectangle ((#ButtonSize2#/3)*2),0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier
Shape3=Rectangle 0,0,#ButtonSize2#,#ButtonSize2# | StrokeWidth 0 | FillColor 0,0,0,1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
DynamicVariables=1
Hidden=#Pause#
TransformationMatrix=#Matrix2#

[PauseAction]
Meter=Shape
DynamicVariables=1
X=(#ButtonX3#-9)
Y=(#ButtonY3#+23)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
Hidden=#Pause#
MouseOverAction=[!SetOption Pause Shape "Rectangle 0,0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier2"][!SetOption Pause Shape2 "Rectangle ((#ButtonSize2#/3)*2),0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Pause Shape "Rectangle 0,0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier"][!SetOption Pause Shape2 "Rectangle ((#ButtonSize2#/3)*2),0,(#ButtonSize2#/3),#ButtonSize2# | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Pause][!update][!Refresh]



[Next]
Meter=Shape
X=#ButtonX4#
Y=#ButtonY4#
ShapeNext=Combine Shape | Union Shape2 | Union Shape3
Shape=Path Next | Extend Modifier
Shape2=Path Next2 | Extend Modifier
Shape3=Rectangle 0,0,(#ButtonSize3#*2),#ButtonSize3# | StrokeWidth 0 | FillColor 0,0,0,1
Next= 0,0 | LineTo 0,#ButtonSize3# | LineTo #ButtonSize3#,(#ButtonSize3#/2) | ClosePath 1
Next2= #ButtonSize3#,0 | LineTo #ButtonSize3#,#ButtonSize3# | LineTo (#ButtonSize3#*2),(#ButtonSize3#/2) | ClosePath 1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
Group=GroupOne
TransformationMatrix=#Matrix2#

[NextAction]
Meter=Shape
X=(#ButtonX4#-8)
Y=(#ButtonY4#+33)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
MouseOverAction=[!SetOption Next Shape "Path Next | Extend Modifier2"][!SetOption Next Shape2 "Path Next2 | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Next Shape "Path Next | Extend Modifier"][!SetOption Next Shape2 "Path Next2 | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Next][!update][!Refresh]



[Previous]
Meter=Shape
X=#ButtonX2#
Y=#ButtonY2#
ShapePrev=Combine Shape | Union Shape2 | Union Shape3
Shape=Path Prev | Extend Modifier
Shape2=Path Prev2 | Extend Modifier
Shape3=Rectangle 0,0,(-(#ButtonSize3#*2)),#ButtonSize3# | StrokeWidth 0 | FillColor 0,0,0,1
Prev= 0,0 | LineTo 0,#ButtonSize3# | LineTo (-#ButtonSize3#),(#ButtonSize3#/2) | ClosePath 1
Prev2= (-#ButtonSize3#),0 | LineTo (-#ButtonSize3#),#ButtonSize3# | LineTo (-(#ButtonSize3#*2)),(#ButtonSize3#/2) | ClosePath 1
Modifier=StrokeWidth 1 | FillColor #ButtonBase# | Stroke Color #StrokeColor#
Modifier2=StrokeWidth 1 | FillColor #ButtonBase2# | Stroke Color #StrokeColor#
Group=GroupOne
TransformationMatrix=#Matrix2#

[PrevAction]
Meter=Shape
X=(#ButtonX2#-40)
Y=(#ButtonY2#+3)
Shape=Ellipse 0,0,#ButtonSize# | FillColor 255,255,255,1 | StrokeWidth 0
MouseOverAction=[!SetOption Previous Shape "Path Prev | Extend Modifier2"][!SetOption Previous Shape2 "Path Prev2 | Extend Modifier2"][!Update]
MouseLeaveAction=[!SetOption Previous Shape "Path Prev | Extend Modifier"][!SetOption Previous Shape2 "Path Prev2 | Extend Modifier"][!Update]
LeftMouseUpAction=[!CommandMeasure MeasurePlayer Previous][!update][!Refresh]

fade1.gif
You do not have the required permissions to view the files attached to this post.
Yincognito
Posts: 658
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 25th, 2019, 4:42 pm

eclectic-tech wrote:
March 25th, 2019, 3:16 pm
The skin update rate has no effect on the speed of your ActionTimer; that was one of the main reasons it was developed.
A much better solution, yes - forgot about ActionTimer. Got to use it someday, but in my case, I'm being pulled back by the "don't overload the Windows message queue" notice on its usage, since I'm always performing the animation, not just on mouse over or clicks. Do you think ActionTimer would be the best solution for a small line of text continuously sliding at a rate of 24 milliseconds (adjustable, though, so it may very well be less, depending on the user's preference)? I just want it to move without any occasional freeze or drawbacks whatsoever, irrespective of other (external) things that might happen in the background. So far doing this through Rainmeter's update rate works perfectly, and I want to keep that behavior if I'm to jump in ActionTimer's boat...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Looking to be pointed in the right direction

eclectic-tech » March 25th, 2019, 4:52 pm

Yincognito wrote:
March 25th, 2019, 4:42 pm
A much better solution, yes - forgot about ActionTimer. Got to use it someday, but in my case, I'm being pulled back by the "don't overload the Windows message queue" notice on its usage, since I'm always performing the animation, not just on mouse over or clicks. Do you think ActionTimer would be the best solution for a small line of text continuously sliding at a rate of 24 milliseconds (adjustable, though, so it may very well be less, depending on the user's preference)? I just want it to move without any occasional freeze or drawbacks whatsoever, irrespective of other (external) things that might happen in the background. So far doing this through Rainmeter's update rate works perfectly, and I want to keep that behavior if I'm to jump in ActionTimer's boat...
I would recommend you keep doing your continual sliding text as you currently do it.

ActionTimer is great for mouse driven events, but I would never use it to drive a continuous animation; a bitmap meter or a measure-driven multiple image meter is a better choice for constant animation.

Of course, any constant animation should be tempered by their ability to cause lag versus the benefit of constant movement. :D
Yincognito
Posts: 658
Joined: February 27th, 2015, 2:38 pm

Re: Looking to be pointed in the right direction

Yincognito » March 25th, 2019, 4:57 pm

eclectic-tech wrote:
March 25th, 2019, 4:52 pm
I would recommend you keep doing your continual sliding text as you currently do it.

ActionTimer is great for mouse driven events, but I would never use it to drive a continuous animation; a bitmap meter or a measure-driven multiple image meter is a better choice for constant animation.

Of course, any constant animation should be tempered by their ability to cause lag versus the benefit of constant movement. :D
Thanks for the info - that's what I thought as well. Especially that the way it is now, it doesn't have any impact on the CPU usage either (I used some neat workarounds for that, and the 24 milliseconds value, as opposed to 16 milliseconds for example, is part of that)... :D

My animation is not perfomed on images, but on a line of text (String meter), by the way.