It is currently May 27th, 2020, 3:21 am

Get folder appear when hovering on right side of my screen

Get help with installing and using Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 10605
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:27 pm

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
If you're sliding the meter from right to left, you have to duplicate the [Chrome] Image meter, because the original image (which I didn't want to manually manipulate through an image processing software, like Photoshop, or anything else) has the icon on right and the string on left. This is the normal position of them if you're sliding the meter to right: the right placed icon is what is visible on the refreshed skin, then when you're hovering the mouse over it, it starts sliding out to right, revealing the string.
But if you want to slide the meter from right to left, you either have to edit the image manually, to move the icon on left of the string, or have to duplicate the Image meter(in this case it is called [Chrome]), cropping the Chrome.png image to get just the icon on the first Image meter and just the string (which in this case is part of the image), on the right placed meter. This is what I did, duplicating the [Chrome] meter. I let the [Chrome] name for the first meter (which has only the icon, done through the ImageCrop=600,0,200,200) and added a second Image meter, named [ChromeName], cropped through the ImageCrop=0,0,600,200 option. The second meter [ChromeName] has been placed to X=0R, which means there is no space between the two meters, so when you're moving the mouse from any of them to the other, there is nothing done, the meters are not moving back.
Alternatively another way would be what jsmorley proposed, to create a String meter for the name. I'm not entering into this solution, it definitely works, but since he have proposed it, I'm not intervene, letting him to help you, if this is what you prefer.
In your last posted code there is one single Image meter ([Chrome]), which moves to left. No second meter, but there is a container added to the [Chrome] Image meter, so when the image slides out, the icon is too much on right and is not reveled, not being under the container meter.
So, let's restart. I posted a code which I can assure you does work. Please try it, for first without modifying it. Does it work?
Jason
Posts: 35
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, 7:12 pm
If you're sliding the meter from right to left, you have to duplicate the [Chrome] Image meter, because the original image (which I didn't want to manually manipulate through an image processing software, like Photoshop, or anything else) has the icon on right and the string on left. This is the normal position of them if you're sliding the meter to right: the right placed icon is what is visible on the refreshed skin, then when you're hovering the mouse over it, it starts sliding out to right, revealing the string.
But if you want to slide the meter from right to left, you either have to edit the image manually, to move the icon on left of the string, or have to duplicate the Image meter(in this case it is called [Chrome]), cropping the Chrome.png image to get just the icon on the first Image meter and just the string (which in this case is part of the image), on the right placed meter. This is what I did, duplicating the [Chrome] meter. I let the [Chrome] name for the first meter (which has only the icon, done through the ImageCrop=600,0,200,200) and added a second Image meter, named [ChromeName], cropped through the ImageCrop=0,0,600,200 option. The second meter [ChromeName] has been placed to X=0R, which means there is no space between the two meters, so when you're moving the mouse from any of them to the other, there is nothing done, the meters are not moving back.
Alternatively another way would be what jsmorley proposed, to create a String meter for the name. I'm not entering into this solution, it definitely works, but since he have proposed it, I'm not intervene, letting him to help you, if this is what you prefer.
In your last posted code there is one single Image meter ([Chrome]), which moves to left. No second meter, but there is a container added to the [Chrome] Image meter, so when the image slides out, the icon is too much on right and is not reveled, not being under the container meter.
So, let's restart. I posted a code which I can assure you does work. Please try it, for first without modifying it. Does it work?
Hi, It is still shuttering. Gif as below.
ChromeGifv8.gif
Code as below

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
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
======================================================================================================================
I tried another one , but i not sure how ImageCrop works, the value for ImageCrop = x1,y1,x2,y2 ?? what the axises ??
ChromeGifv9.gif
The code is as below

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]
 
[Chrome]
Meter=Image
Group=Items
ImageName=#@#Buttons\Transparent\Chrome.png
H=50
X=#X1#
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!Update]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["Chrome.exe"]
RightMouseDownAction=[!Update]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,0,150))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,0,150))"]#U#
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 10605
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 18th, 2020, 4:13 am
Hi, It is still shuttering. Gif as below.
ChromeGifv8.gif
Code as below
Slightly - slightly I'm out of ideas, because copying and pasting your code, this is what I get:
GIF.gif
So, no idea what is going on your side...
You do not have the required permissions to view the files attached to this post.
Jason
Posts: 35
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 18th, 2020, 1:43 pm
Slightly - slightly I'm out of ideas, because copying and pasting your code, this is what I get:
GIF.gif
So, no idea what is going on your side...
How about this one below ? it seem like working, it just that the chrome icon is on the right side... Need to move the chrome icon to the left side ???
I tried another one , but i not sure how ImageCrop works, the value for ImageCrop = x1,y1,x2,y2 ?? what the axises ??
ChromeGifv9.gif
The code is as below

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]
 
[Chrome]
Meter=Image
Group=Items
ImageName=#@#Buttons\Transparent\Chrome.png
H=50
X=#X1#
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
LeftMouseDownAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "150"][!Update]
LeftMouseUpAction=[!SetOption "#CURRENTSECTION#" "ImageAlpha" "255"][!Update]["Chrome.exe"]
RightMouseDownAction=[!Update]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,0,150))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,0,150))"]#U#
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 10605
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 18th, 2020, 2:03 pm
How about this one below ? it seem like working, it just that the chrome icon is on the right side... Need to move the chrome icon to the left side ???
I tried another one , but i not sure how ImageCrop works, the value for ImageCrop = x1,y1,x2,y2 ?? what the axises ??
ChromeGifv9.gif
You might edit the unFold\@Resources\Buttons\Transparent\Chrome.png image into an image editor (Photoshop or whatever), moving the Chrome string to the right side of the icon.
Or alternatively you could use what jsmorley proposed a while ago: use the original image, cropped to get only the icon and use a proper String meter for the name.
The first solution is easier if you are good in image manipulating, so if you are familiar with Photoshop or a similar software. Otherwise, you could choose the second solution.
Which one do you prefer? If you choose the image manipulating (the first) solution, I can't help you, since image manipulation is not my strong side. But if you want to chose the second solution, I might try to further help. So, what's your choice?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3933
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

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

Post by eclectic-tech »

Jason wrote:
May 18th, 2020, 2:03 pm
How about this one below ? it seem like working, it just that the chrome icon is on the right side... Need to move the chrome icon to the left side ???
I tried another one , but i not sure how ImageCrop works, the value for ImageCrop = x1,y1,x2,y2 ?? what the axises ??
Balala's reply beat me, but just to offer you options, here is what my thoughts are:

You can learn how to use cropping here: ImageCrop. But your code does not use cropping. :confused:

The values in your code are designed to work with a 200X50 rectangle which has the chrome icon size of 50X50 and positioned at 0,0 and a skinwidth of 200 pixels. The image is positioned on the X-axis at 150 (X1's value), so only the first 50 pixels show; this is because your skinwidth hides everything to the right after 200 pixels. Then the action timer changes the X1 value by subtracting 5 on each update until X1 equals zero and the entire image is shown.
Chrome.png (200X50 pixels)
chrome.png
Using this image in your code works for me.

You are "simulating" button reactions by changing the image alpha, which has the drawback that you can leave the image "faded" if you click-hold and move off the meter... why not just use a button image and meter? Save this image as 'chrome3.png' in your @resources\Buttons\Transparent' folder and create a new skin with the code in the same folder as your current code.
Chrome3.png (600X50 pixels)
chrome3.png
Skin code using a 'Button' meter:

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]
 
[Chrome]
Meter=Button
Group=Items
ButtonImage=#@#Buttons\Transparent\Chrome3.png
H=50
X=#X1#
DynamicVariables=1
MouseOverAction=[!CommandMeasure MeasureSlide "Stop 2"][!CommandMeasure MeasureSlide "Execute 1"]
MouseLeaveAction=[!CommandMeasure MeasureSlide "Stop 1"][!CommandMeasure MeasureSlide "Execute 2"]
LeftMouseUpAction=["Chrome.exe"]
RightMouseDownAction=[!Update]

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
Group=Sliders
ActionList1=Repeat Left,5,30
Left=[!SetVariable X1 "(Clamp(#X1#-5,0,150))"]#U#
ActionList2=Repeat Right,5,30
Right=[!SetVariable X1 "(Clamp(#X1#+5,0,150))"]#U#
DynamicVariables=1
The only reason I can assume why you are experiencing jitters, must be related to your image. If you are still not able to get this to work, post your images and code, so we have everything you are using and can duplicate the issue.

You now have 3 or 4 variations of sliding images that work; you need to decide which method you want to use and stick with it. The nwe all know what variant you are having issues with and may be able to offer help.

Asides:
I hate codes that use mouse 'down' actions: once you use 'down' actions in a left mouse bang, you disable being able to move the skin around your screen; I avoid using mouse 'down' actions as if they were Covid-19. :x
Using the right mouse for actions eliminates an end user from easily accessing Rainmeter features; middle mouse actions are better suited for updates and refreshes. 'Ctrl'+'right-mouse button-up' will show the default context menu, but why make end users do this?
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 10605
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 »

eclectic-tech wrote:
May 18th, 2020, 3:31 pm
You can learn how to use cropping here: ImageCrop. But your code does not use cropping. :confused:
The code you are talking about indeed doesn't use cropping, however there were more codes using it. For instance the first code here, which Jason had issues with. I don't have an explanation why he has those issues, because the code works perfectly for my. Could you maybe give it a try? Thanks if you do.
eclectic-tech wrote:
May 18th, 2020, 3:31 pm
The only reason I can assume why you are experiencing jitters, must be related to your image. If you are still not able to get this to work, post your images and code, so we have everything you are using and can duplicate the issue.
Or Jason, even better, pack the unFold config as you have it on your computer and upload the package.
Jason
Posts: 35
Joined: January 9th, 2020, 6:00 pm

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

Post by Jason »

do you know how to hide the the edge icon ??
as like when i hover over then it will slide to the right.


Thanks
Last edited by Jason on May 19th, 2020, 2:27 pm, edited 1 time in total.
Jason
Posts: 35
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 18th, 2020, 3:44 pm
Or Jason, even better, pack the unFold config as you have it on your computer and upload the package.
how to pack the unfold config ????
Upload the package ( is the same as Add files to attachments ) ??

You mean like this? I zipped the unfold folder from my computer. ( I have only edited the chrome.ini fie. )
unFold Jason.rar

balala, is okay, cause i searched online for the code for sliding to the left ( They changed the icon to the right side) and the bug is still there ~~~~
Thanks for the help ~
You do not have the required permissions to view the files attached to this post.
Jason
Posts: 35
Joined: January 9th, 2020, 6:00 pm

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

Post by Jason »

do you know how to hide the the edge icon ??
as like when i hover over then it will slide to the right.

or is it possible to use this code from here https://forum.rainmeter.net/viewtopic.php?f=103&t=34412 and then add an icon ??

Thanks