It is currently March 28th, 2024, 10:10 pm

Get folder appear when hovering on right side of my screen

Get help with installing and using Rainmeter.
Jason
Posts: 41
Joined: January 9th, 2020, 6:00 pm

Re: Get folder appear when hovering on right side of my screen

Post by Jason »

balala wrote: May 16th, 2020, 5:59 pm In fact this makes sense and might be true, however it's not what I posted. There really are two Image meters, [Chrome] and [ChromeName], both got by cropping two disting parts of the same image. But the positions of these meters are set to X=(-#X1#) for the first (the left) one (in this case [Chrome]) and to X=0R for the second (the right) one ([ChromeName]). This means there is no space between them and before I posted the code, gave it a try. Perfectly worked (works). So either there something has been modified, or I have no idea.

So Jason, please post the incriminated code exactly as you have it now on the skin which gives the issue.
Hi, okay balala, below are the codes.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
SkinWidth=200

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
X1=-150
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[IconStyle]
Group=Items
SolidColor=0,0,0,1
ImageName=#@#Buttons\Transparent\Chrome.png
H=50
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
LeftMouseDownAction=[!SetOptionGroup Items ImageAlpha "150"][!UpdateMeterGroup "Items"][!Redraw]
LeftMouseUpAction=[!SetOptionGroup Items ImageAlpha "255"]["Chrome.exe"][!UpdateMeterGroup "Items"][!Redraw]
RightMouseDownAction=[!Update]

[Chrome]
Meter=Image
MeterStyle=IconStyle
X=(-#X1#)
ImageCrop=600,0,200,200

[ChromeName]
Meter=Image
MeterStyle=IconStyle
X=0R
Y=0r
ImageCrop=0,0,600,200

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,-150,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,-150,0))"]#U#
DynamicVariables=1
the gif below is the illustrator of the code
ChromeGifv5.gif
Thanks
You do not have the required permissions to view the files attached to this post.
Last edited by Jason on May 17th, 2020, 2:01 pm, edited 1 time in total.
Jason
Posts: 41
Joined: January 9th, 2020, 6:00 pm

Re: Get folder appear when hovering on right side of my screen

Post by Jason »

Oh by the way, this is how it looks like for the icon sliding of right side.
EdgeGif.gif
The edge codes for the gif are as above.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
X1=-150
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[Edge]
Meter=Image
Group=Items
ImageName=#@#Buttons\Transparent\Edge.png
H=50
X=#X1#
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!Update]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"]
RightMouseDownAction=[!Update]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,-150,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,-150,0))"]#U#
DynamicVariables=1
Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get folder appear when hovering on right side of my screen

Post by jsmorley »

Jason wrote: May 17th, 2020, 2:23 am Hi, tested the code, and it look like this.

ChromeGifv4.gif

Below are the code for the gif
  • Code: Select all

    [Rainmeter]
    Update=1000
    DynamicWindowSize=1
    AccurateText=1
    SkinWidth=250
    
    [Variables]
    U=[!UpdateMeasure *][!UpdateMeter *][!Redraw]
    W=10
    Container1X=190
    
    [MeterContainer1]
    Meter=Shape
    X=#Container1X#
    Y=0
    Shape=Rectangle 0,0,250,55 | StrokeWidth 0
    DynamicVariables=1
    
    [MeterBackground1]
    Meter=Shape
    X=0
    Y=0
    Shape=Rectangle 0,0,250,55 | StrokeWidth 0 | Fill Color 0,0,0,1
    MouseOverAction=[!CommandMeasure MeasureSlide1 "Stop 2"][!CommandMeasure MeasureSlide1 "Execute 1"]
    MouseLeaveAction=[!CommandMeasure MeasureSlide1 "Stop 1"][!CommandMeasure MeasureSlide1 "Execute 2"]
    LeftMouseUpAction=[!Log "Executed Google Chrome command"]
    Container=MeterContainer1
    
    [MeterIcon1]
    Meter=Image
    ImagePath=#@#Buttons\Transparent\
    ImageName=Chrome.png
    X=5
    Y=5
    W=45
    H=45
    Container=MeterContainer1
    
    [MeterText1]
    Meter=String
    X=30R
    Y=9r
    FontSize=17
    FontWeight=400
    FontColor=0,174,15,255
    AntiAlias=1
    Text=Google Chrome
    Container=MeterContainer1
    
    [MeasureSlide1]
    Measure=Plugin
    Plugin=ActionTimer
    ActionList1=Repeat Left,#W#,26
    Left=[!SetVariable Container1X "(Clamp(#Container1X#-10,0,190))"]#U#
    ActionList2=Repeat Right,#W#,26
    Right=[!SetVariable Container1X "(Clamp(#Container1X#+10,0,190))"]#U#
    DynamicVariables=1
    

Well, you simply can't continue to use that image that has both the icon and the text as is, or it's just not going to work sliding it from the right instead of from the left. You need to cut out just the icon, and use that along with a String meter for the text, as I did, or create two Image meters, one for the icon and one for the string, which is what Balala did. Just using your existing image, and setting it to a static size of 45X45 is going to make it all squished and stretched, which is what you are getting.
Jason
Posts: 41
Joined: January 9th, 2020, 6:00 pm

Re: Get folder appear when hovering on right side of my screen

Post by Jason »

jsmorley wrote: May 17th, 2020, 2:58 am Well, you simply can't continue to use that image that has both the icon and the text as is, or it's just not going to work sliding it from the right instead of from the left. You need to cut out just the icon, and use that along with a String meter for the text, as I did, or create two Image meters, one for the icon and one for the string, which is what Balala did. Just using your existing image, and setting it to a static size of 45X45 is going to make it all squished and stretched, which is what you are getting.
How to change the goolge chrome to the orignal color of the previous code ??
Is there any way to debugged it ?


Thanks
Jason
Posts: 41
Joined: January 9th, 2020, 6:00 pm

Re: Get folder appear when hovering on right side of my screen

Post by Jason »

balala wrote: May 12th, 2020, 5:46 pm Is this code working and is it sliding in the meter?
Anyway here is a solution:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
X1=-150
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[MeterContainer]
Meter=Image
SolidColor=255,240,0
X=0
Y=0
W=150
H=50
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]

[Chrome]
Meter=Image
Group=Items
ImageName=#@#Buttons\Transparent\Chrome.png
H=50
X=(Abs(#X1#))
DynamicVariables=1
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"]["Chrome.exe"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
RightMouseDownAction=[!Update]
Container=MeterContainer

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,-150,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,-150,0))"]#U#
DynamicVariables=1
I had to add a [MeterContainer] meter, because when the [Chrome] meter is sliding in from left, it starts from a point which ia outside of the skin, to left, so it's not visible. But if it's sliding from right, it is visible, unless you're setting a smaller width for the skin, than the position where initially the meter is. This would be another solution, but since we anyway need a meter which has to hovering the mouse over to start the meter sliding, I decided to add the [MeterContainer] container meter.
I moved the MouseOverAction and MouseLeaveAction options to this meter. Now as described, the [Chrome] meter slides in when you're hovering the mouse over the container. I also replaced the X option of the [Chrome] meter (X=(Abs(#X1#))), to get it sliding from right. The value of this variable in your initial code has been increased from -150 to 0 and if we apply an Abs function (as did above), the X position of the meter is decreasing from 150 to 0, which led to a sliding from right to left.
Also note that I replaced the [!Update] bang used into the LeftMouseDownAction and LeftMouseUpAction options of the [Chrome] meter with [!UpdateMeter "#CURRENTSECTION#"][!Redraw], because when you're setting new values for the ImageAlpha option of the Image meter, there is no need to update the whole skin, it's enough to update only the [Chrome] meter itself.
I didn't know the size of the Chrome.png image, used into the [Chrome] meter, so I added an arbitrary width for the [MeterContainer] meter (set it to 150). If this is not the proper value (and it probably isn't) modify the value accordingly. But if the width of the [Chrome] meter is larger then 150, you have to modify beside the W option of the [MeterContainer] meter, the formulas used into the Left and Right options of the [MeasureSlide] measure as well. If you don't know how to deal with this, please let me know, to can assist you.
Does my above code work and does it properly?
Hi balala, i do some retraced the previous chat that we had and found that this code works but the chrome icon disappear, see the gif below.
ChromeGifv6.gif
Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Get folder appear when hovering on right side of my screen

Post by balala »

Jason wrote: May 17th, 2020, 2:23 am Hi, tested the code, and it look like this.

ChromeGifv4.gif
I'm sorry, but if you're moving the mouse so quickly, the posted image is completely useless. :confused:
Jason
Posts: 41
Joined: January 9th, 2020, 6:00 pm

Re: Get folder appear when hovering on right side of my screen

Post by Jason »

balala wrote: May 17th, 2020, 6:09 pm I'm sorry, but if you're moving the mouse so quickly, the posted image is completely useless. :confused:
my bad.. , the below is the new gif.
ChromeGifv7.gif
The chrome icon is missing.

Thank You.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Get folder appear when hovering on right side of my screen

Post by balala »

Jason wrote: May 17th, 2020, 2:31 am Hi, okay balala, below are the codes.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1
SkinWidth=200

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
X1=-150
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[IconStyle]
Group=Items
SolidColor=0,0,0,1
ImageName=#@#Buttons\Transparent\Chrome.png
H=50
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
LeftMouseDownAction=[!SetOptionGroup Items ImageAlpha "150"][!UpdateMeterGroup "Items"][!Redraw]
LeftMouseUpAction=[!SetOptionGroup Items ImageAlpha "255"]["Chrome.exe"][!UpdateMeterGroup "Items"][!Redraw]
RightMouseDownAction=[!Update]

[Chrome]
Meter=Image
MeterStyle=IconStyle
X=(-#X1#)
ImageCrop=600,0,200,200

[ChromeName]
Meter=Image
MeterStyle=IconStyle
X=0R
Y=0r
ImageCrop=0,0,600,200

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,-150,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,-150,0))"]#U#
DynamicVariables=1
the gif below is the illustrator of the code
ChromeGifv5.gif
Sorry, but no such issues here. Using the above posted code by you, this is what I get:
GIF.gif
So, don't know what to say...
Jason wrote: May 17th, 2020, 2:50 am The edge codes for the gif are as above.
The posted code is practically the same as the original code of Edge.ini. In fact there is one single difference, namely in the LeftMouseUpAction option of the [Edge] meter.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Get folder appear when hovering on right side of my screen

Post by balala »

Jason wrote: May 17th, 2020, 6:15 pm The chrome icon is missing.
Please post once again the actual code. I suppose you accidentally have removed something, but let's see...
Jason
Posts: 41
Joined: January 9th, 2020, 6:00 pm

Re: Get folder appear when hovering on right side of my screen

Post by Jason »

balala wrote: May 17th, 2020, 6:24 pm Please post once again the actual code. I suppose you accidentally have removed something, but let's see...

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,1

[Metadata]
Name=unFold
Author=DevilRev

[Variables]
X1=-150
U=[!UpdateMeasureGroup Sliders][!UpdateMeterGroup Items][!Redraw]

[MeterContainer]
Meter=Image
SolidColor=255,240,0
X=0
Y=0
W=150
H=50
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]

[Chrome]
Meter=Image
Group=Items
ImageName=#@#Buttons\Transparent\Chrome.png
H=50
X=(Abs(#X1#))
DynamicVariables=1
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"]["Chrome.exe"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
RightMouseDownAction=[!Update]
Container=MeterContainer

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,-150,0))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,-150,0))"]#U#
DynamicVariables=1
Thanks