It is currently June 26th, 2019, 10:54 pm

Create "scrollbar"

Help with creating, editing & fixing problems with skins
User avatar
Mr. Spock
Posts: 46
Joined: August 5th, 2013, 6:07 pm
Location: The Netherlands

Re: Create "scrollbar"

Mr. Spock » June 19th, 2015, 4:05 pm

Instead of opening programs i want to activate skins from my HTPC suite so it have the effect like to scrollbar as in XBMC (Kodi)
Action0=[!ToggleConfig "ScrollBar\Buttons" "Buttons.ini"] works like a charm it shows the skin unhide it an hide it
Action1=[!ToggleConfig "ScrollBar\IMDB" "Imdb.ini"] don't work also action 2 is not working
So it's better to use !ActivateConfig and !DeactivateConfig ?
or is there a better way ?

Sorry if i was not clear inof the skin you gave me works perfect
User avatar
balala
Rainmeter Sage
Posts: 8319
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Create "scrollbar"

balala » June 19th, 2015, 4:37 pm

Are you sure you have the #SKINSPATH#\ScrollBar\IMDB\Imdb.ini and the #SKINSPATH#\ScrollBar\IMDB\Imdb.ini skins? Because if the Action0 is working and the others are not, then I think you have a problem with those skins. You could try an !ActivateConfig bang, to see if it works: Action1=[!ActivateConfig "ScrollBar\IMDB" "Imdb.ini"] (be careful to have the Imdb.ini skin closed at refresh of the scrollbar), but it can't be done to also unhide the skin, as !ToggleConfig does.
User avatar
Mr. Spock
Posts: 46
Joined: August 5th, 2013, 6:07 pm
Location: The Netherlands

Re: Create "scrollbar"

Mr. Spock » July 13th, 2015, 9:21 am

All the skins are working now (gone add more in the future) working out step by step so i encounter the errors one by one.
Now having the following problem

First 2 image's are perfect allignt
But 3e not (see image)


Dirty skin
https://drive.google.com/file/d/0B_CuFN5jCNftS2RCSmIxR0l2UXc/view?usp=sharing

Where do i go wrong
Strange is that the distance between 2&3 is bigger then between 1&2
User avatar
balala
Rainmeter Sage
Posts: 8319
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Create "scrollbar"

balala » July 13th, 2015, 11:52 am

It's normal, because the first three images (Soft0.png - Soft2.png) are wider (in fact the width of Soft0.png and Soft1.png is 180, the width of Soft2.png is 185), while the last three images are narrower (64). The width of the images is used in determination of their position. It'd be a good idea to use images with the same width. Also, if you don't need them, you can remove the MeterSoft3, MeterSoft4 and MeterSoft5 sections.
User avatar
Mr. Spock
Posts: 46
Joined: August 5th, 2013, 6:07 pm
Location: The Netherlands

Re: Create "scrollbar"

Mr. Spock » July 14th, 2015, 7:43 am

Geez why is it that my brains always make from a small problem the most difficult problem :D
I gone use up to 10 buttons so there will come more.
Thx for pointing me to the simple answer :great:
User avatar
balala
Rainmeter Sage
Posts: 8319
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Create "scrollbar"

balala » July 14th, 2015, 8:05 am

You're welcome.
Schuim
Posts: 3
Joined: January 23rd, 2019, 9:04 pm

Re: Create "scrollbar"

Schuim » January 23rd, 2019, 9:22 pm

About kicking up and old topic.

Maybe I'm not using the right search word for it.
But I'm looking for an loopable scroll wheel for my shortcuts.

If read something about using Loop instead of Calc, but I'm probably missing some skills here.

I've created these docks that pop up when I click them, within them there are shortcuts to applications etc.
But now I'm looking for a way to make the shortcuts scrollable in a loop.

I could not seem to fix it with the code shown in previous posts.
The first one was a good start, but there was no way that I was getting the loop fixed.

Image
https://ibb.co/k3zrDqf


The code as used at the moment to create a scroller:

Code: Select all

[Rainmeter]
Update=1
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!Move "(#SCREENAREAWIDTH#-[MeterImage0:W]-30)" "0"]

[Variables]
ImgNo=0

[MeterScrollDown/Up]
Meter=image
X=0
Y=0
W=300
H=75
ImageName=#@#Shortcuts\AoE 300x75
ImageAlpha=0
StringAlign=CENTERCENTER
MouseScrollDownAction=[!SetVariable ImgNo "((#ImgNo#+1)%10)"]
MouseScrollUpAction=[!SetVariable ImgNo "((#ImgNo#-1)%10)"]
DynamicVariables=1

[MeasureImgNo]
Measure=Calc
Formula=(( #ImgNo# < 0 ) ? ( Abs ( 10 - Abs ( #ImgNo# ))) : ( Abs ( #ImgNo# )))
DynamicVariables=1

[MeterImage0]
Meter=Image
X=0
Y=0
W=300
H=75
ImageName=#@#Shortcuts\AoE2HD 300x75
LeftMouseUpAction=http://www.outlook.com
Hidden=([MeasureImgNo]<>0)
DynamicVariables=1

[MeterImage1]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\AoE3 300x75
Hidden=([MeasureImgNo]<>1)
DynamicVariables=1

[MeterImage2]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\AoE3 300x75
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1


Hope someone can help me.
It's probably something small, but I'm breaking my mind on it.
User avatar
balala
Rainmeter Sage
Posts: 8319
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Create "scrollbar"

balala » January 23rd, 2019, 9:58 pm

Schuim wrote:
January 23rd, 2019, 9:22 pm
Hope someone can help me.
It's probably something small, but I'm breaking my mind on it.
The formula used into the MouseScrollDownAction option of the [MeterScrollDown/Up] meter is good, it starts to increase the value of the ImgNo variable, then if it reaches 9, it is restarted from 0. But the formula of MouseScrollUpAction is not good at all. You can't apply the modulo operator when you're decreasing the value of the variable.
The only thing you have to do is to replace the mentioned option with the following one: MouseScrollUpAction=[!SetVariable ImgNo "((#ImgNo#>0)?(#ImgNo#-1):9)"]. With this formula, if ImgNo reaches 0, on next scroll it switches to 9, then continuing decreasing.

Just mention additionally that this code with the above update, will properly work only if you have 10 Image meters ([MeterImage0] - [MeterImage9]). Do you have them?
User avatar
balala
Rainmeter Sage
Posts: 8319
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Create "scrollbar"

balala » January 24th, 2019, 12:59 pm

Schuim wrote:
January 23rd, 2019, 9:22 pm
The code as used at the moment to create a scroller:
One more related to your code: the smallest possible value of Update ([Rainmeter] section) is 16. Update=1 is not valid, and nor is it needed. Replace it with the default Update=1000. Details in the second paragraph here: https://docs.rainmeter.net/manual-beta/skins/rainmeter-section/#Update
Schuim
Posts: 3
Joined: January 23rd, 2019, 9:04 pm

Re: Create "scrollbar"

Schuim » January 24th, 2019, 6:59 pm

Alright,
I changed the code as you suggested.

But somehow the meter disappears after showing the last image, regardless the amount of images used.
It's going to some where I can't find it, and only appears again after an refresh.
But I would like it to restart again from the first image.

Another thing, the scrolling goes rough, it show Image 1, 3, and then 9, and then the meter disappears.
(Images used are functioning correct and are used in this example as placeholders.)

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!Move "(#SCREENAREAWIDTH#-[MeterImage0:W]-30)" "0"]

[Variables]
ImgNo=0

[MeterScrollDown/Up]
Meter=image
X=0
Y=0
W=300
H=75
ImageName=#@#Shortcuts\AoE 300x75.png
ImageAlpha=0
StringAlign=CENTERCENTER
MouseScrollDownAction=[!SetVariable ImgNo "((#ImgNo#+1)%10)"]
MouseScrollUpAction=[!SetVariable ImgNo "((#ImgNo#>0)?(#ImgNo#-1):9)"]
DynamicVariables=1

[MeasureImgNo]
Measure=Calc
Formula=(( #ImgNo# < 0 ) ? ( Abs ( 10 - Abs ( #ImgNo# ))) : ( Abs ( #ImgNo# )))
DynamicVariables=1

[MeterImage0]
Meter=Image
X=0
Y=0
W=300
H=75
ImageName=#@#Shortcuts\AoE2HD 300x75.png
LeftMouseUpAction=http://www.outlook.com
Hidden=([MeasureImgNo]<>0)
DynamicVariables=1

[MeterImage1]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\AoE3 300x75.png
Hidden=([MeasureImgNo]<>1)
DynamicVariables=1

[MeterImage2]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\BF1 300x75.png
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

[MeterImage3]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\BF2 300x75.png
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

[MeterImage4]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\BF3 300x75.png
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

[MeterImage5]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\BF4 300x75.png
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

[MeterImage6]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\BF5 300x75.png
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

[MeterImage7]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\BF1942 300x75.png
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

[MeterImage8]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\Chrome 300x75
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

[MeterImage9]
Meter=Image
X=0r
Y=0r
W=300
H=75
ImageName=#@#Shortcuts\Firefox 300x75
Hidden=([MeasureImgNo]<>2)
DynamicVariables=1

Hope you or someone sees what's the screw-up here.
Thanks