It is currently April 27th, 2024, 5:21 pm
General topics related to Rainmeter.
AlC
Posts: 329 Joined: June 9th, 2011, 6:46 pm
Post
by AlC » August 11th, 2011, 5:33 pm
Hey Guys
I wanted my skins a little more CPU friendly, by replacing !Update with !UpdateMeter.
this code worked fine, but it updates to whole skin
Code: Select all
[Backward]
Meter=STRING
MeterStyle=Style
FontColor=#ColorBack#
X=10R
Y=r
Text="Backward"
MouseOverAction=!Execute [!RainmeterSetVariable ColorBack #ColorMusicActive#][!Update]
MouseLeaveAction=!Execute [!RainmeterSetVariable ColorBack #ColorMusicNormal#][!Update]
LeftMouseDownAction=!execute [!RainmeterPluginBang "mPlayer SetPosition -5"][!RainmeterUpdate]
DynamicVariables=1
change to
Code: Select all
[Backward]
Meter=STRING
MeterStyle=Style
FontColor=#ColorBack#
X=10R
Y=r
Text="Backward"
MouseOverAction=!Execute [!RainmeterSetVariable ColorBack #ColorMusicActive#][!UpdateMeter]
MouseLeaveAction=!Execute [!RainmeterSetVariable ColorBack #ColorMusicNormal#][!UpdateMeter]
LeftMouseDownAction=!execute [!RainmeterPluginBang "mPlayer SetPosition -5"][!RainmeterUpdate]
DynamicVariables=1
!UpdateMeter and !UpdateMeter Backward don't work.
So is the code false or is Updatemeter the false Bang for this ? 2.1 895
Edit: What is false:
I go on the meter it takes
1 second then is #ColorMusicActive#,
I left the meter it takes
1 second then is #ColorMusicNormal#
Rainmeter - You are only limited by your imagination and creativity.
AlC
Posts: 329 Joined: June 9th, 2011, 6:46 pm
Post
by AlC » August 12th, 2011, 9:49 am
Okey Update:
The above code couldn't work, because it updates the meter but not the Variables (I think)
Then I updated the code with !SetOption to this :
Code: Select all
[Backward]
Meter=STRING
MeterStyle=Style
;FontColor=#ColorBack#
X=10R
Y=r
Text="Backward"
MouseOverAction=!Execute [!SetOption Backward FontColor #ColorMusicActive#][!UpdateMeter Backward #CURRENTCONFIG#]
MouseLeaveAction=!Execute [!SetOption Backward FontColor #ColorMusicNormal#][!UpdateMeter Backward #CURRENTCONFIG#]
LeftMouseDownAction=!execute [!RainmeterPluginBang "mPlayer SetPosition -5"][!RainmeterUpdate]
DynamicVariables=1
But it didn't work again, it don't update the meter.
So Why ?? Can anyone help ??
Rainmeter - You are only limited by your imagination and creativity.
Seahorse
Posts: 1175 Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK
Post
by Seahorse » August 12th, 2011, 10:04 am
I am using this to highlight text, works fine, font is #Colour1# initially:
Code: Select all
MouseOverAction=!Execute [!SetOption "#CURRENTSECTION#" FontColor #Colour2#][[!Update]
MouseLeaveAction=!Execute [!SetOption "#CURRENTSECTION#" FontColor #Colour1#][!Update]
AlC
Posts: 329 Joined: June 9th, 2011, 6:46 pm
Post
by AlC » August 12th, 2011, 10:18 am
the code "works" of course, but my problem is the update
[!Update]
Updates the whole skin with all meters, measure, calcs ... isn't it??
and !UpdateMeter should update only the meter, which would be in this case enough. From the manual:
!UpdateMeter [Meter] (Config)
Immediately updates the given meter regardless of UpdateDivider.
and I have not only backward but also pause, play, next ... and all the launchers, too.
Because in the "highlight" case it would be enough to only update the meter and not the complete skin/config.
That's my "problem" and I can't bring it to work.
Rainmeter - You are only limited by your imagination and creativity.
spx
Developer
Posts: 686 Joined: August 15th, 2009, 2:41 pm
Location: Osaka, JPN
Post
by spx » August 12th, 2011, 1:17 pm
Add !Redraw after !UpdateMeter.
AlC
Posts: 329 Joined: June 9th, 2011, 6:46 pm
Post
by AlC » August 12th, 2011, 3:26 pm
Ahhww Redraw ...
So when I use !Update, it updates all (meters,variables) and I
don't need !Redraw
And with !UpdateMeter, it updates the meter and I
need !Redraw
mmh... why I don't need !Redraw at !Update
or is a kind of !Redraw in !Update
If this is the case then should be a kind of !RedrawMeter in !UpdateMeter !
Anyway...
Thank you spx
After testing it a while, I found it's a little bit more CPU friendly than !Update and it's good for my mind
Rainmeter - You are only limited by your imagination and creativity.
poiru
Developer
Posts: 2872 Joined: April 17th, 2009, 12:18 pm
Post
by poiru » August 12th, 2011, 3:31 pm
AlC wrote: mmh... why I don't need !Redraw at !Update
!Update is virtually identical to what occurs every Update= cycle (which includes redrawing the skin).
AlC
Posts: 329 Joined: June 9th, 2011, 6:46 pm
Post
by AlC » August 12th, 2011, 3:54 pm
poiru wrote: !Update is virtually identical to what occurs every Update= cycle (which includes redrawing the skin).
Okey understand.
Sorry, but I must ask this :
Would it be then better, if !UpdateMeter update the meter ( including redrawing the meter) ?
Also can you say !UpdateMeter update the meter like a "Update= cycle", because when this is true, it should redraw the meter ?
Rainmeter - You are only limited by your imagination and creativity.
poiru
Developer
Posts: 2872 Joined: April 17th, 2009, 12:18 pm
Post
by poiru » August 12th, 2011, 4:07 pm
AlC wrote: Sorry, but I must ask this :
Would it be then better, if !UpdateMeter update the meter ( including redrawing the meter) ?
Also can you say !UpdateMeter update the meter like a "Update= cycle", because when this is true, it should redraw the meter ?
I haven't wandered into the draw-handling code, but I believe that this isn't possible (in general). Draws accumulate, which basically means that the previous shape of the meter would remain (until the next full update and a full redraw) if only one component is (re)drawn.
AlC
Posts: 329 Joined: June 9th, 2011, 6:46 pm
Post
by AlC » August 13th, 2011, 7:11 pm
Okay, thank you very much for explaining it.
Rainmeter - You are only limited by your imagination and creativity.