With the ActionTimer plugin you can move the meter quicker with smaller but more steps or slower, larger but less steps. Will post a sample code immediately.Deofol wrote: ↑February 25th, 2020, 7:45 pm I'd want EpicIconBackground to move smoothly (50,0) away from SteamIconBackground, as if it was getting pulled from behind of it. I was reading about ActionTimer but to achieve this with it I'd have to set many actions to achieve so where they all move EpicIconBackground's X by 1-2 pixels until reaching 50
It is currently May 6th, 2024, 3:23 am
MoveMeter not showing my meter
-
- Rainmeter Sage
- Posts: 16200
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: MoveMeter not showing my meter
-
- Rainmeter Sage
- Posts: 7203
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: MoveMeter not showing my meter
That's excellent then.
Yeah, you're probably right. As I said, Lua scripts are not exactly my favorite Rainmeter topic...balala wrote: ↑February 25th, 2020, 7:30 pm
Doesn't even have to. There is nothing in the code of the [EpicIconBackground] meter which is controlled by any of the [Fade], [EpicFade] or [InvertedFade] measures. I suppose its transparency should be controlled by the [EpicFade] measure, but for this, the Shape option should be Shape=Rectangle 0,0,#IconSize#,#IconSize# | Fill Color 0,0,0,[EpicFade]. But it's not, the transparency is set staticly to 255. So, I'm not sure at all what the [EpicFade] measure should do. Apart from the fact that it is activated into the MouseOverAction / MouseLeaveAction options of the [EpicIconBackground] meter itself, this measure is nowhere used into the code. So, what is its purpose?
The code is not exactly clear to me. Am I missing something?
This should be relatively easy to do with ActionTimer (no pressure on you though). If the meter is moving from 0,0 to 50,50 just increment both X and Y of the meter in the Move1 action in the list. But I'll let you post the solution, as you prefer ActionTimer more than I do... For this kind of jobs, it's perfect, as the animation is short and it stops eventually.
-
- Posts: 19
- Joined: February 19th, 2020, 6:29 am
Re: MoveMeter not showing my meter
Hey, don't let them intimidate you, they're just as simple as using libraries on programming languagesYincognito wrote: ↑February 25th, 2020, 8:17 pm Yeah, you're probably right. As I said, Lua scripts are not exactly my favorite Rainmeter topic...
-
- Rainmeter Sage
- Posts: 16200
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: MoveMeter not showing my meter
Right. This was my idea as well. Working on it...Yincognito wrote: ↑February 25th, 2020, 8:17 pm This should be relatively easy to do with ActionTimer (no pressure on you though).
-
- Rainmeter Sage
- Posts: 7203
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: MoveMeter not showing my meter
I'm not intimidated by them, I'm a programmer myself (started with Pascal and made a math graph app and a game in highschool, then in Delphi some other stuff, some C#, some Javascript and a Google extension built a couple of years ago, some VBA for my Civ 4 game, etc.). I just don't particularly like to use Lua when Rainmeter itself could do the job ... if asked nicely.
The funny thing is that I could have started a long time ago with Lua, as I was designing some behavior for my TV Tuner remove in this beautiful application called Promixis Girder (now sadly dead), and they had the option to add scripts in Lua. Never used them then, as the app did its job on its own, never used them in Rainmeter now, for pretty much the same reason.
-
- Rainmeter Sage
- Posts: 16200
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: MoveMeter not showing my meter
And here is the sample code, as promised.
Note the newly added U and X variables, the [MeasureSlide] measure and the X=#X# and Y=#X# options of the [SteamIconBackground] meter (no, the Y=#X# is ok, there is no mistake into it).
Obviously this is just a sample, it has to be rewritten if you want to get it working differently. I had to add the bangs to start / stop the animation to the MouseOverAction / MouseLeaveAction options of the [EpicIconBackground], not to [SteamIconBackground] meter, where the !MoveMeter bangs were. Yincognito has described why.
The sample code:
Code: Select all
[Variables]
IconSize=48
IconText="P"
IconColor=2e2e2e
SteamPath=D:\Steam\Steam.exe
RockstarPath=D:\Rockstar Games\Launcher\LauncherPatcher.exe
EpicPath=D:\Epic Games\Launcher\Portal\Binaries\Win32\EpicGamesLauncher.exe
NexonPath=D:\Nexon\Nexon Launcher\nexon_launcher.exe
U=[!UpdateMeasure "MeasureSlide"][!UpdateMeter "SteamIconBackground"][!Redraw]
X=0
; https://forum.rainmeter.net/viewtopic.php?t=12802
[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Right,20,25
Right=[!SetVariable X "(Clamp((#X#+2),0,50))"]#U#
ActionList2=Repeat Left,20,25
Left=[!SetVariable X "(Clamp((#X#-2),0,50))"]#U#
DynamicVariables=1
[Fade]
Measure=Script
ScriptFile="#@#Scripts\Fade.lua"
Min=0
Max=255
Step=20
Start=0
[EpicFade]
Measure=Script
ScriptFile="#@#Scripts\Fade.lua"
Min=0
Max=255
Step=20
Start=0
[InvertedFade]
Measure=Script
ScriptFile="#@#Scripts\Fade.lua"
Min=0
Max=255
Step=20
Start=255
;[Move]
;Measure=Script
;ScriptFile="#@#Scripts\Fade.lua"
;Min=0
;Max=50
;Step=4
;Start=0
[TextSize]
Measure=Calc
Formula=#IconSize#/2
[TextPosition]
Measure=Calc
Formula=#IconSize#/2
[TextShadowPosition]
Measure=Calc
Formula=#IconSize#/4+3
[ControllerIconBackground]
Meter=Shape
Shape=Rectangle 0,0,#IconSize#,#IconSize# | Fill Color #IconColor#
DynamicVariables=1
MouseActionCursor=1
AntiAlias=1
[EpicIconBackground]
Meter=Shape
Shape=Rectangle 0,0,#IconSize#,#IconSize# | Fill Color 0,0,0,255
MouseOverAction=[!CommandMeasure "EpicFade" "Activate('In')"][!CommandMeasure "MeasureSlide" "Execute 1"][!CommandMeasure "MeasureSlide" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "EpicFade" "Activate('Out')"][!CommandMeasure "MeasureSlide" "Stop 1"][!CommandMeasure "MeasureSlide" "Execute 2"]
LeftMouseUpAction=["#EpicPath#"]
DynamicVariables=1
MouseActionCursor=1
AntiAlias=1
[SteamIconBackground]
Meter=Shape
X=#X#
Y=#X#
Shape=Rectangle 0,0,#IconSize#,#IconSize# | Extend MyColor
MyColor=FillColor 42,71,94,[Fade]
MouseOverAction=[!CommandMeasure "Fade" "Activate('In')"][!CommandMeasure "InvertedFade" "Activate('Out')"][!SetOption "ControllerIconBackground" "MyColor" "FillColor 42,71,94,255"]
MouseLeaveAction=[!CommandMeasure "Fade" "Activate('Out')"][!CommandMeasure "InvertedFade" "Activate('In')"][!SetOption "ControllerIconBackground" "MyColor" "FillColor #IconColor#"]
LeftMouseUpAction=["#SteamPath#"]
DynamicVariables=1
MouseActionCursor=1
AntiAlias=1
[SteamIconShadow]
Meter=Image
ImageName=steam.png
W=[TextSize]
H=[TextSize]
PreserveAspectRatio=1
X=[TextShadowPosition]
Y=[TextShadowPosition]
ImageTint=0,0,0,[Fade]
DynamicVariables=1
AntiAlias=1
[SteamIconImage]
Meter=Image
ImageName=steam.png
W=[TextSize]
H=[TextSize]
PreserveAspectRatio=1
X=([TextPosition]/2)
Y=([TextPosition]/2)
ImageTint=255,255,255,[Fade]
DynamicVariables=1
AntiAlias=1
[ControllerIconImage]
Meter=Image
ImageName=controller.png
W=[TextSize]
H=[TextSize]
PreserveAspectRatio=1
X=([TextPosition]/2)
Y=([TextPosition]/2)
ImageTint=255,255,255,[InvertedFade]
DynamicVariables=1
AntiAlias=1
-
- Rainmeter Sage
- Posts: 7203
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: MoveMeter not showing my meter
Only now one can say "Good Job"! I didn't test your code, but I have confidence in your abilities, so ...balala wrote: ↑February 25th, 2020, 8:45 pm And here is the sample code, as promised.
Note the newly added U and X variables, the [MeasureSlide] measure and the X=#X# and Y=#X# options of the [SteamIconBackground] meter (no, the Y=#X# is ok, there is no mistake into it).
Obviously this is just a sample, it has to be rewritten if you want to get it working differently. I had to add the bangs to start / stop the animation to the MouseOverAction / MouseLeaveAction options of the [EpicIconBackground], not to [SteamIconBackground] meter, where the !MoveMeter bangs were. Yincognito has described why.
The sample code:Does it work?Code: Select all
[Variables] IconSize=48 IconText="P" IconColor=2e2e2e SteamPath=D:\Steam\Steam.exe RockstarPath=D:\Rockstar Games\Launcher\LauncherPatcher.exe EpicPath=D:\Epic Games\Launcher\Portal\Binaries\Win32\EpicGamesLauncher.exe NexonPath=D:\Nexon\Nexon Launcher\nexon_launcher.exe U=[!UpdateMeasure "MeasureSlide"][!UpdateMeter "SteamIconBackground"][!Redraw] X=0 ; https://forum.rainmeter.net/viewtopic.php?t=12802 [MeasureSlide] Measure=Plugin Plugin=ActionTimer ActionList1=Repeat Right,20,25 Right=[!SetVariable X "(Clamp((#X#+2),0,50))"]#U# ActionList2=Repeat Left,20,25 Left=[!SetVariable X "(Clamp((#X#-2),0,50))"]#U# DynamicVariables=1 [Fade] Measure=Script ScriptFile="#@#Scripts\Fade.lua" Min=0 Max=255 Step=20 Start=0 [EpicFade] Measure=Script ScriptFile="#@#Scripts\Fade.lua" Min=0 Max=255 Step=20 Start=0 [InvertedFade] Measure=Script ScriptFile="#@#Scripts\Fade.lua" Min=0 Max=255 Step=20 Start=255 ;[Move] ;Measure=Script ;ScriptFile="#@#Scripts\Fade.lua" ;Min=0 ;Max=50 ;Step=4 ;Start=0 [TextSize] Measure=Calc Formula=#IconSize#/2 [TextPosition] Measure=Calc Formula=#IconSize#/2 [TextShadowPosition] Measure=Calc Formula=#IconSize#/4+3 [ControllerIconBackground] Meter=Shape Shape=Rectangle 0,0,#IconSize#,#IconSize# | Fill Color #IconColor# DynamicVariables=1 MouseActionCursor=1 AntiAlias=1 [EpicIconBackground] Meter=Shape Shape=Rectangle 0,0,#IconSize#,#IconSize# | Fill Color 0,0,0,255 MouseOverAction=[!CommandMeasure "EpicFade" "Activate('In')"][!CommandMeasure "MeasureSlide" "Execute 1"][!CommandMeasure "MeasureSlide" "Stop 2"] MouseLeaveAction=[!CommandMeasure "EpicFade" "Activate('Out')"][!CommandMeasure "MeasureSlide" "Stop 1"][!CommandMeasure "MeasureSlide" "Execute 2"] LeftMouseUpAction=["#EpicPath#"] DynamicVariables=1 MouseActionCursor=1 AntiAlias=1 [SteamIconBackground] Meter=Shape X=#X# Y=#X# Shape=Rectangle 0,0,#IconSize#,#IconSize# | Extend MyColor MyColor=FillColor 42,71,94,[Fade] MouseOverAction=[!CommandMeasure "Fade" "Activate('In')"][!CommandMeasure "InvertedFade" "Activate('Out')"][!SetOption "ControllerIconBackground" "MyColor" "FillColor 42,71,94,255"] MouseLeaveAction=[!CommandMeasure "Fade" "Activate('Out')"][!CommandMeasure "InvertedFade" "Activate('In')"][!SetOption "ControllerIconBackground" "MyColor" "FillColor #IconColor#"] LeftMouseUpAction=["#SteamPath#"] DynamicVariables=1 MouseActionCursor=1 AntiAlias=1 [SteamIconShadow] Meter=Image ImageName=steam.png W=[TextSize] H=[TextSize] PreserveAspectRatio=1 X=[TextShadowPosition] Y=[TextShadowPosition] ImageTint=0,0,0,[Fade] DynamicVariables=1 AntiAlias=1 [SteamIconImage] Meter=Image ImageName=steam.png W=[TextSize] H=[TextSize] PreserveAspectRatio=1 X=([TextPosition]/2) Y=([TextPosition]/2) ImageTint=255,255,255,[Fade] DynamicVariables=1 AntiAlias=1 [ControllerIconImage] Meter=Image ImageName=controller.png W=[TextSize] H=[TextSize] PreserveAspectRatio=1 X=([TextPosition]/2) Y=([TextPosition]/2) ImageTint=255,255,255,[InvertedFade] DynamicVariables=1 AntiAlias=1
Of course, the OP has the final verdict on this, as usual.
-
- Posts: 19
- Joined: February 19th, 2020, 6:29 am
Re: MoveMeter not showing my meter
So do I and I'll be testing as soon as I'm done with a job I'm doing. I'll hit you guys up with the finished result once I got it thanks a lot @balYincognito wrote: ↑February 25th, 2020, 8:57 pm Only now one can say "Good Job"! I didn't test your code, but I have confidence in your abilities, so ...
Of course, the OP has the final verdict on this, as usual.
-
- Rainmeter Sage
- Posts: 16200
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: MoveMeter not showing my meter
Ok, just let us know please how does it work.
-
- Posts: 19
- Joined: February 19th, 2020, 6:29 am
Re: MoveMeter not showing my meter
Well, I just tried it. Not working the right way but I'll sort out what's going on. SteamIconBackground, ControllerIconBackground and their respective icons won't show at all. It seems like EpicIconBackground is on top of them but also there is *something* that moves like it should. Working on it to see if I can fix