Indeed, good catch!balala wrote: ↑October 17th, 2024, 7:34 pm No, I have not, excepting the fact that the FinishAction option is not valid on a Calc measure. It can be used on WebParser measure and on a few plugin measures (like Ping, RunCommand, FileView and so on), but not on a Calc measure. However the posted option doesn't cause any trouble, but strictly speaking it should be removed.
It is currently October 23rd, 2024, 1:40 am
Determining the top / bottom position
-
- Rainmeter Sage
- Posts: 8537
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Determining the top / bottom position
-
- Posts: 81
- Joined: September 21st, 2024, 4:57 pm
- Location: Germany, in the stone cave
Re: Determining the top / bottom position
Thank you, I didn't know that...balala wrote: ↑October 17th, 2024, 7:34 pm
-> the FinishAction option is not valid on a Calc measure <-
It can be used on WebParser measure and on a few plugin measures (like Ping, RunCommand, FileView and so on), but not on a Calc measure. However the posted option doesn't cause any trouble, but strictly speaking it should be removed.
For the upper screen area I now have this option, for the lower screen area it will be more difficult because I have to change the Y-position by the size of the skin, I have no idea yet. But I try to understand and learn everything
Code: !!! no longer current !!!
Last edited by Rooky_89 on October 18th, 2024, 2:32 pm, edited 4 times in total.
-
- Rainmeter Sage
- Posts: 16686
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Determining the top / bottom position
I can't follow you, especially that you didn't post the whole code, but I have to add a few things, which are not mandatory to be followed, but are recommended:
- There is no need to quote anything in Rainmeter. You've quoted the ImageFolder variable, into the [Variables] section (ImageFolder="%USERPROFILE%\Pictures"), but Rainmeter simply ignores them. The ImageFolder=%USERPROFILE%\Pictures form of the option is quite well, no need for quoting, however as said, Rainmeter simply ignores the quotes, so this doesn't give headache.
- The Plugin=Plugins\QuotePlugin.dll option used this way in the [MeasureImage] measure, is extremely outdated. The simplest Plugin=QuotePlugin is the most common form of this option (however due to backward compatibility the used form is also working).
- Not sure what you did want to achieve by the Rondom=1 option on the same [MeasureImage] measure, but such an option, in this form, doesn't exist. You can use a Random function on a Calc measures, but even there a Random option doesn't exist (and even less a Rondom option). But here the same: since Rainmeter simply ignores the not-existing options, this option doesn't create problems either.
- In IfConditions (and same way on formula options of a Calc measure), Rainmeter always use the numeric value of a measure, so no need to use the name of a measure as a section variable. You did this into the IfCondition option of the [MeasurePosition] measure (IfCondition=([MeasurePosition]>#SCREENAREAHEIGHT#/2)). Recommend to use it as IfCondition=(MeasurePosition>#SCREENAREAHEIGHT#/2).
- You could use a MeasureName option instead of ImageName, into the [MeterImage] meter. If you want to do this, replace the ImageName=[MeasureImage] option by MeasureName=MeasureImage
-
- Posts: 81
- Joined: September 21st, 2024, 4:57 pm
- Location: Germany, in the stone cave
Re: Determining the top / bottom position
Hello people
Many thanks for the detailed explanation. For the "Round=1 option" I thought that an image would always be selected at random. I want to learn it properly and program.
There isn't a lot of programming code. It should be a small slide show that changes the image every 15 minutes and when you move the mouse over it the image should enlarge. With every project do you learn something new
- If the skin is at the top of the screen, it should open downwards/or expand. (Works for me )
- If the skin is at the bottom of the screen (task bar), it should open upwards/or expand.
;------------------------------------------------------------
I Found the Source of Random... https://docs.rainmeter.net/manual/measures/calc/
;------------------------------------------------------------
Now you can see the current skin code down below. The measurement screen at the top works by extending the skin. When the Skin is in the lower position, the remaining value measure of the taskbar always remains 48px. The problem that I see now is that you can change the height of the taskbar if I remember correctly. Then the value may change.
You do not have the required permissions to view the files attached to this post.
Last edited by Rooky_89 on October 18th, 2024, 6:34 pm, edited 2 times in total.
-
- Posts: 81
- Joined: September 21st, 2024, 4:57 pm
- Location: Germany, in the stone cave
Re: Determining the top / bottom position
Hello
It is really tricky... Now i have a little demonstration of it. but i have problem to back to old position and size of the skin. The i need a wise head who can help me. It needs to be revised.
Skin-Code (Up to Date)
It is really tricky... Now i have a little demonstration of it. but i have problem to back to old position and size of the skin. The i need a wise head who can help me. It needs to be revised.
Skin-Code (Up to Date)
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 8537
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Determining the top / bottom position
Not as much as you think though. As an example, take the code here and replace the last two mouse actions with the ones here, for a different take on this. Left click and scroll up and down then right click and scroll up and down to notice the differences (it's a horizontal expansion, but it's more or less the same idea for a vertical one). Of course, if you don't want to change the skin anchor, the previous advices should be followed.
-
- Rainmeter Sage
- Posts: 16686
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Determining the top / bottom position
Same here as Yincognito. Not so tricky as it seems on a first look. What you have missed is that if you want to extend the skin upward, you have to put the image downer than to Y=0, because if you put the image to its default position (Y=0), you can't extend it upward.
So, I'd try something like this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
SolidColor=255,255,255,255
BackgroundMode=2
[Variables]
background_W=300
background_H=70
MouseOver=0
;--------------------------------------------------------------------
;ImageFolder=%USERPROFILE%\Documents\Rainmeter\Skins\ZeroSix\!Bing - Wallpaper\DownloadFile\
ImageFolder=d:\Documents\Pictures
Interval=15
;--------------------------------------------------------------------
;
[CoverContainer]
Meter=Shape
Shape=Rectangle 0,(130-[MeasurePositionYTop]*(#background_H#-70)),#background_W#,#background_H#,8 | StrokeWidth 0
DynamicVariables=1
;[Background]
;Meter=Image
;Container=CoverContainer
;AntiAlias=1
;==================================================================
; #MEASURE #MEASURE #MEASURE #MEASURE
;==================================================================
;
[MeasurePositionYTop]
Measure=Calc
Formula=(#CURRENTCONFIGY#>=#WORKAREAHEIGHT#-300)
IfCondition=(#CURRENTSECTION#>=1)
;IfTrueAction=[!SetVariable MouseOver "0"][!UpdateMeter "MeterImage"][!UpdateMeter "CoverContainer"][!Redraw]
;IfFalseAction=[!SetVariable MouseOver "130"][!UpdateMeter "MeterImage"][!UpdateMeter "CoverContainer"][!Redraw]
DynamicVariables=1
;Disabled=1
;[MeasurePosYBottom]
;Measure=Calc
;Formula=(#SCREENAREAHEIGHT#-#background_H#-#CURRENTCONFIGY#)
;DynamicVariables=1
;Disabled=1
;
;==================================================================
; #MEASURE-PICTURE #MEASURE-PICTURE #MEASURE-PICTURE
;==================================================================
;
[MeasureImage]
Measure=Plugin
Plugin=QuotePlugin.dll
PathName=#ImageFolder#
FileFilter=*.png;*.jpg;*.jpeg;*.bmp
UpdateDivider=#Interval#
[MeasureName]
Measure=String
String=[MeasureImage]
Substitute=".*\\":""
RegExpSubstitute=1
DynamicVariables=1
;
;==================================================================
;
;==================================================================
;
[MeterImage]
Meter=Image
ImageName=[MeasureImage]
Container=CoverContainer
Borderline=255,255,255,255
Y=(130-[MeasurePositionYTop]*(#background_H#-70))
W=#background_W#
H=#background_H#
PreserveAspectRatio=2
DynamicVariables=1
LeftMouseUpAction=!Execute [explorer.exe "[MeasureImage]"]
MouseOverAction=[!SetVariable background_H "200"][!UpdateMeter "CoverContainer"][!UpdateMeter "MeterImage"][!Redraw]
MouseLeaveAction=[!SetVariable background_H "70"][!UpdateMeter "CoverContainer"][!UpdateMeter "MeterImage"][!Redraw]
[TestString]
Meter=String
MeasureName=MeasurePositionYTop
MeasureName2=MeasurePosYBottom
FontFace=Arial
FontStyle=BOLD
FontSize=20
FontColor=0,1,1,255
SolidColor=0,0,0,1
InlineSetting=Shadow | 1 | 1 | 2 | 0,0,0,255
MeterStyle=styleLeftText
X=0
Y=0
W=280
Text=PosY_Top: %1 PosY_Bot: %2
AntiAlias=1
DynamicVariables=1
ClipString=2
-
- Posts: 81
- Joined: September 21st, 2024, 4:57 pm
- Location: Germany, in the stone cave
Re: Determining the top / bottom position
Hello,
After a few attempts I have the final version. Yincognito you were right with [!SetAnchor "0" "100%"] It slides open for a slowly and closes slowly [really nice]. I didn't know about this option before. With every Project i grow. Thank you very much.
It works [Done]
[/Snippet]
Version before ==============================================================
Version-Now
After a few attempts I have the final version. Yincognito you were right with [!SetAnchor "0" "100%"] It slides open for a slowly and closes slowly [really nice]. I didn't know about this option before. With every Project i grow. Thank you very much.
It works [Done]
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
ContainerH=70
background_W=300
U=[!UpdateMeasure Slider][!UpdateMeter *][!Redraw]
icon1=@Icons\Picture.png
;-----------------------------------------------------
ImageFolder=%USERPROFILE%\Documents\Rainmeter\Skins\ZeroSix\!Bing - Wallpaper\DownloadFile\
;-----------------------------------------------------
Sekunden=180
;==================================================================
; #BASE #BASE #BASE #BASE
;==================================================================
;
[MeterBackVisible]
Meter=Shape
Shape=Rectangle 2,2,#background_W#,#ContainerH#,10 | Fill Color 0,0,0,0 | StrokeWidth 4 | Stroke Color 0,0,0,180
DynamicVariables=1
AntiAlias=1
MouseOverAction=[!SetAnchor "0" "100%"][!CommandMeasure Slider "Execute 1"][!SetOption MeterImage ImageTint 255,255,255,255][!HideMeterGroup HEADLINE]
MouseLeaveAction=[!CommandMeasure Slider "Stop 1"][!CommandMeasure Slider "Execute 2"][!SetOption MeterImage ImageTint 110,110,110,255][!ShowMeterGroup HEADLINE]
[MeterBackContainer]
Meter=Shape
Shape=Rectangle 2,2,#background_W#,#ContainerH#,10
DynamicVariables=1
AntiAlias=1
[Headline]
Group=HEADLINE
DynamicVariables=1
Meter=String
FontFace=Arial
FontStyle=BOLD
FontSize=25
FontColor=255,255,255,255
InlineSetting=Shadow | 1 | 1 | 2 | 0,0,0,180
X=150
Y=13
Text="Pictures"
StringAlign=Center
AntiAlias=1
[Icon_Picture]
Group=HEADLINE
Meter=Image
ImageName=#icon1#
X=10
Y=(#ContainerH#-48)/2
W=46
H=48
AntiAlias=1
DynamicVariables=1
;
;==================================================================
; #MEASURE-PICTURE #MEASURE-PICTURE #MEASURE-PICTURE
;==================================================================
;
[MeasureImage]
Measure=Plugin
Plugin=QuotePlugin.dll
PathName=#ImageFolder#
FileFilter=*.png;*.jpg;*.jpeg;*.bmp
UpdateDivider=#Sekunden#
[Slider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideDown,2,46
SlideDown=[!SetVariable ContainerH "(Clamp(#ContainerH#+4,70,200))"]#U#
ActionList2=Repeat SlideUp,2,46
SlideUp=[!SetVariable ContainerH "(Clamp(#ContainerH#-4,70,200))"]#U#
DynamicVariables=1
[MeterImage]
Meter=Image
ImageName=[MeasureImage]
Container=MeterBackContainer
ImageTint=110,110,110,255
AntiAlias=1
X=2
Y=2
H=#ContainerH#
W=#background_W#
PreserveAspectRatio=2
DynamicVariables=1
Version before ==============================================================
Version-Now
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 8537
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Determining the top / bottom position
Glad you made it, well done - looks very nice too!
As I said, if you don't want to change the skin anchor, it can be done using some !SetVariable with (... ? ... : ...) conditionals and a !Move bang, but you must be careful with the order of bangs and retaining the needed values (using the #standard# and the [#nested] syntax for variables helps in that case), especially when sliding back / "contracting" the skin, as sliding forth / " expanding" will work right away.
Good choice with the slow motion sliding, that's the ActionTimer plugin at work, not the anchor change. By the way, I don't see you setting back the anchor to "0" "0%" in the code, I suppose you only use the skin at the bottom of the screen and expanding upwards now and you don't really need the anchor back at the top left corner of the skin and expanding downwards anymore...
-
- Rainmeter Sage
- Posts: 16686
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Determining the top / bottom position
Instead of the !Move bang, the !SetWindowPosition bang can alter both: the position and the anchor of the skin, by one.Yincognito wrote: ↑October 19th, 2024, 5:34 pm As I said, if you don't want to change the skin anchor, it can be done using some !SetVariable with (... ? ... : ...) conditionals and a !Move bang,