It is currently April 19th, 2024, 9:27 pm

Here's an idea which is probably too stupid or too interesting, or both BOOK!

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Here's an idea which is probably too stupid or too interesting, or both BOOK!

Post by balala »

Ao Nuu Shin wrote: June 9th, 2019, 2:57 pm No!!! Don't worry about it!
You mean you don't want me to post that code?
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Here's an idea which is probably too stupid or too interesting, or both BOOK!

Post by Ao Nuu Shin »

balala wrote: June 9th, 2019, 4:09 pm You mean you don't want me to post that code?
I would be indebted if you could. Sadly, I may have to put that idea on hold, I have some issues with my health, seems like the operation I had 3 years ago isn't going well, the wound remains open and now it bleeds more constantly than before. I have to go and check with the doctor.
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Here's an idea which is probably too stupid or too interesting, or both BOOK!

Post by balala »

Ao Nuu Shin wrote: June 11th, 2019, 10:43 am I would be indebted if you could.
Ok, starting from the code I've posted previously, here is an animated version of it. Now you can click either to the left page to turn it backward, or to the right one, to turn if forward. I think scrolling also could be added, but it's not yet.
Please try this code out and let me know what you think.
The code:

Code: Select all

[Rainmeter]
Update=-1

[Variables]
Page=0
Sign=-1
PageTurn=0
Page0=First page
Page1=Second page
Page2=Third page
Page3=Fourth page
Page4=Fifth page
Page5=Sixth page
Page6=Seventh page
Page7=Eigth page
U=[!UpdateMeasure "MeasureSlide"][!UpdateMeasure "MeasureTurn"][!UpdateMeterGroup "Pages"][!Redraw]

[PageStyle]
SolidColor=255,255,255
W=170
H=220
DynamicVariables=1
Group=Pages

[StringStyle]
ClipString=1
FontColor=25,25,25
FontEffectColor=220,220,220
SolidColor=0,0,0,1
StringEffect=Shadow
FontFace=Segoe UI
StringStyle=BOLD
AntiAlias=1
DynamicVariables=1
Group=Pages

[MeasureTurn]
Measure=Calc
Formula=( #Page# + #Sign# * #PageTurn# / 5 )
IfCondition=((#PageTurn#=10)&&(#Sign#=-1))
IfTrueAction=[!SetVariable Page "(#Page#-Ceil(#PageTurn#/10))"][!SetVariable PageTurn "0"][!UpdateMeasure "MeasureSlide"][!UpdateMeasure "MeasurePage"]
IfCondition2=((#PageTurn#=10)&&(#Sign#=1))
IfTrueAction2=[!SetVariable Page "(#Page#+Ceil(#PageTurn#/10))"][!SetVariable PageTurn "0"][!UpdateMeasure "MeasureSlide"][!UpdateMeasure "MeasurePage"]
DynamicVariables=1

[MeasurePage]
Measure=Calc
Formula=#Page#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!DisableMouseAction MeterPageLeft "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page0#"][!SetOption MeterStringPageRight Text "#Page1#"][!SetOption MeterStringPageLeft2 Text "#Page2#"][!SetOption MeterStringPageRight2 Text "#Page3#"][!UpdateMeterGroup "Pages"][!Redraw]
IfCondition2=(#CURRENTSECTION#=1)
IfTrueAction2=[!EnableMouseAction MeterPageLeft "LeftMouseUpAction"][!EnableMouseAction MeterPageRight "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page2#"][!SetOption MeterStringPageRight Text "#Page3#"][!SetOption MeterStringPageLeft2 Text "#Page4#"][!SetOption MeterStringPageRight2 Text "#Page5#"][!SetOption MeterStringPageLeft3 Text "#Page0#"][!SetOption MeterStringPageRight3 Text "#Page1#"][!UpdateMeterGroup "Pages"][!Redraw]
IfCondition3=(#CURRENTSECTION#=2)
IfTrueAction3=[!EnableMouseAction MeterPageLeft "LeftMouseUpAction"][!EnableMouseAction MeterPageRight "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page4#"][!SetOption MeterStringPageRight Text "#Page5#"][!SetOption MeterStringPageLeft2 Text "#Page6#"][!SetOption MeterStringPageRight2 Text "#Page7#"][!SetOption MeterStringPageLeft3 Text "#Page2#"][!SetOption MeterStringPageRight3 Text "#Page3#"][!UpdateMeterGroup "Pages"][!Redraw]
IfCondition4=(#CURRENTSECTION#=3)
IfTrueAction4=[!DisableMouseAction MeterPageRight "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page6#"][!SetOption MeterStringPageRight Text "#Page7#"][!SetOption MeterStringPageLeft3 Text "#Page4#"][!SetOption MeterStringPageRight3 Text "#Page5#"][!UpdateMeterGroup "Pages"][!Redraw]
DynamicVariables=1

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Forward,100,10
Forward=[!SetVariable PageTurn "(#PageTurn#+1)"]#U#
;ActionList2=Repeat Backward,100,10
;Backward=[!SetVariable PageTurn "(10-((#PageTurn#+1)%10))"]#U#
DynamicVariables=1

[MeterBackground]
Meter=Image
SolidColor=0,0,0,220
X=0
Y=0
W=361
H=240

[MeterPageLeft]
Meter=Image
MeterStyle=PageStyle
X=10r
Y=10r
LeftMouseUpAction=[!SetVariable Sign "-1"][!UpdateMeasure "MeasureTurn"][!UpdateMeterGroup "Pages"][!CommandMeasure "MeasureSlide" "Execute 1"]
;[!SetVariable Page "(Clamp((#Page#-1),0,3))"][!UpdateMeasure "MeasurePage"]

[MeterPageRight]
Meter=Image
MeterStyle=PageStyle
X=1R
Y=0r
LeftMouseUpAction=[!SetVariable Sign "1"][!UpdateMeasure "MeasureTurn"][!UpdateMeterGroup "Pages"][!CommandMeasure "MeasureSlide" "Execute 1"]
;[!SetVariable Page "(Clamp((#Page#+1),0,3))"][!UpdateMeasure "MeasurePage"]

[MeterContainerLeft]
Meter=Image
SolidColor=255,0,0,150
X=-171r
Y=0r
W=170
H=220

[MeterContainerRight]
Meter=Image
SolidColor=255,240,0,150
X=1R
Y=0r
W=170
H=220

[MeterStringPageLeft]
Meter=String
MeterStyle=StringStyle
X=(10-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerLeft

[MeterStringPageLeft2]
Meter=String
MeterStyle=StringStyle
X=(180-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerLeft

[MeterStringPageLeft3]
Meter=String
MeterStyle=StringStyle
X=(-150-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerLeft

[MeterStringPageRight]
Meter=String
MeterStyle=StringStyle
X=(10-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerRight

[MeterStringPageRight2]
Meter=String
MeterStyle=StringStyle
X=(180-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerRight

[MeterStringPageRight3]
Meter=String
MeterStyle=StringStyle
X=(-150-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerRight
Note that here are just eight pages, but further ones can be added.
Ao Nuu Shin wrote: June 11th, 2019, 10:43 am Sadly, I may have to put that idea on hold, I have some issues with my health, seems like the operation I had 3 years ago isn't going well, the wound remains open and now it bleeds more constantly than before. I have to go and check with the doctor.
This is not good. Definitely. Go and visit a doctor.
Wish all the best and health.
Ao Nuu Shin
Posts: 128
Joined: May 2nd, 2015, 9:13 am

Re: Here's an idea which is probably too stupid or too interesting, or both BOOK!

Post by Ao Nuu Shin »

balala wrote: June 11th, 2019, 8:11 pm Ok, starting from the code I've posted previously, here is an animated version of it. Now you can click either to the left page to turn it backward, or to the right one, to turn if forward. I think scrolling also could be added, but it's not yet.
Please try this code out and let me know what you think.
The code:

Code: Select all

[Rainmeter]
Update=-1

[Variables]
Page=0
Sign=-1
PageTurn=0
Page0=First page
Page1=Second page
Page2=Third page
Page3=Fourth page
Page4=Fifth page
Page5=Sixth page
Page6=Seventh page
Page7=Eigth page
U=[!UpdateMeasure "MeasureSlide"][!UpdateMeasure "MeasureTurn"][!UpdateMeterGroup "Pages"][!Redraw]

[PageStyle]
SolidColor=255,255,255
W=170
H=220
DynamicVariables=1
Group=Pages

[StringStyle]
ClipString=1
FontColor=25,25,25
FontEffectColor=220,220,220
SolidColor=0,0,0,1
StringEffect=Shadow
FontFace=Segoe UI
StringStyle=BOLD
AntiAlias=1
DynamicVariables=1
Group=Pages

[MeasureTurn]
Measure=Calc
Formula=( #Page# + #Sign# * #PageTurn# / 5 )
IfCondition=((#PageTurn#=10)&&(#Sign#=-1))
IfTrueAction=[!SetVariable Page "(#Page#-Ceil(#PageTurn#/10))"][!SetVariable PageTurn "0"][!UpdateMeasure "MeasureSlide"][!UpdateMeasure "MeasurePage"]
IfCondition2=((#PageTurn#=10)&&(#Sign#=1))
IfTrueAction2=[!SetVariable Page "(#Page#+Ceil(#PageTurn#/10))"][!SetVariable PageTurn "0"][!UpdateMeasure "MeasureSlide"][!UpdateMeasure "MeasurePage"]
DynamicVariables=1

[MeasurePage]
Measure=Calc
Formula=#Page#
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!DisableMouseAction MeterPageLeft "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page0#"][!SetOption MeterStringPageRight Text "#Page1#"][!SetOption MeterStringPageLeft2 Text "#Page2#"][!SetOption MeterStringPageRight2 Text "#Page3#"][!UpdateMeterGroup "Pages"][!Redraw]
IfCondition2=(#CURRENTSECTION#=1)
IfTrueAction2=[!EnableMouseAction MeterPageLeft "LeftMouseUpAction"][!EnableMouseAction MeterPageRight "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page2#"][!SetOption MeterStringPageRight Text "#Page3#"][!SetOption MeterStringPageLeft2 Text "#Page4#"][!SetOption MeterStringPageRight2 Text "#Page5#"][!SetOption MeterStringPageLeft3 Text "#Page0#"][!SetOption MeterStringPageRight3 Text "#Page1#"][!UpdateMeterGroup "Pages"][!Redraw]
IfCondition3=(#CURRENTSECTION#=2)
IfTrueAction3=[!EnableMouseAction MeterPageLeft "LeftMouseUpAction"][!EnableMouseAction MeterPageRight "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page4#"][!SetOption MeterStringPageRight Text "#Page5#"][!SetOption MeterStringPageLeft2 Text "#Page6#"][!SetOption MeterStringPageRight2 Text "#Page7#"][!SetOption MeterStringPageLeft3 Text "#Page2#"][!SetOption MeterStringPageRight3 Text "#Page3#"][!UpdateMeterGroup "Pages"][!Redraw]
IfCondition4=(#CURRENTSECTION#=3)
IfTrueAction4=[!DisableMouseAction MeterPageRight "LeftMouseUpAction"][!SetOption MeterStringPageLeft Text "#Page6#"][!SetOption MeterStringPageRight Text "#Page7#"][!SetOption MeterStringPageLeft3 Text "#Page4#"][!SetOption MeterStringPageRight3 Text "#Page5#"][!UpdateMeterGroup "Pages"][!Redraw]
DynamicVariables=1

[MeasureSlide]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Forward,100,10
Forward=[!SetVariable PageTurn "(#PageTurn#+1)"]#U#
;ActionList2=Repeat Backward,100,10
;Backward=[!SetVariable PageTurn "(10-((#PageTurn#+1)%10))"]#U#
DynamicVariables=1

[MeterBackground]
Meter=Image
SolidColor=0,0,0,220
X=0
Y=0
W=361
H=240

[MeterPageLeft]
Meter=Image
MeterStyle=PageStyle
X=10r
Y=10r
LeftMouseUpAction=[!SetVariable Sign "-1"][!UpdateMeasure "MeasureTurn"][!UpdateMeterGroup "Pages"][!CommandMeasure "MeasureSlide" "Execute 1"]
;[!SetVariable Page "(Clamp((#Page#-1),0,3))"][!UpdateMeasure "MeasurePage"]

[MeterPageRight]
Meter=Image
MeterStyle=PageStyle
X=1R
Y=0r
LeftMouseUpAction=[!SetVariable Sign "1"][!UpdateMeasure "MeasureTurn"][!UpdateMeterGroup "Pages"][!CommandMeasure "MeasureSlide" "Execute 1"]
;[!SetVariable Page "(Clamp((#Page#+1),0,3))"][!UpdateMeasure "MeasurePage"]

[MeterContainerLeft]
Meter=Image
SolidColor=255,0,0,150
X=-171r
Y=0r
W=170
H=220

[MeterContainerRight]
Meter=Image
SolidColor=255,240,0,150
X=1R
Y=0r
W=170
H=220

[MeterStringPageLeft]
Meter=String
MeterStyle=StringStyle
X=(10-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerLeft

[MeterStringPageLeft2]
Meter=String
MeterStyle=StringStyle
X=(180-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerLeft

[MeterStringPageLeft3]
Meter=String
MeterStyle=StringStyle
X=(-150-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerLeft

[MeterStringPageRight]
Meter=String
MeterStyle=StringStyle
X=(10-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerRight

[MeterStringPageRight2]
Meter=String
MeterStyle=StringStyle
X=(180-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerRight

[MeterStringPageRight3]
Meter=String
MeterStyle=StringStyle
X=(-150-(#Sign#*#PageTurn#*([#CURRENTSECTION#:W]+1)/10))
Y=10
W=150
H=200
Container=MeterContainerRight
Note that here are just eight pages, but further ones can be added.

This is not good. Definitely. Go and visit a doctor.
Wish all the best and health.
Balala, you are really the best. Honestly. Thank you, I will try it out and let you know, I'll be active as soon as I put my life together, so many things happening one after another lately, and lack of sleep is not a good thing to counter them all. Thank you.
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Here's an idea which is probably too stupid or too interesting, or both BOOK!

Post by balala »

Ao Nuu Shin wrote: June 12th, 2019, 10:37 pm I'll be active as soon as I put my life together, so many things happening one after another lately, and lack of sleep is not a good thing to counter them all.
Ok, get some rest and try it out when you have enough time. Just please post your opinion about it.
Wish you health and all the best.