Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1487

Help: Rainmeter Skins • Re: Secret Digital Diary help

$
0
0
yay i did it the date works now but i can't figure out with the scrolling feature aha i don't understand it if u could also explain how it works i'd really appreciate thank for all the help you've done, if u could help edit just this last part of the code i'd really appreciate it let me send u the link to download so u can edit directly mine https://mega.nz/file/9SNHjRZQ#qR6MdgXvB0mZBn8anC-agYtRrdhsgBmxyUwR8i9RYaU
This is just about duplicating stuff under a different name and adding / removing the corresponding variables / options / sections to the duplicate as needed. Based on my last code (which I strongly recommend instead of my first one, as it's better), here's a "date box" placed where the "file info" stuff was earlier (obviously, you can change colors, fonts, place it differently, etc.):

Code:

[Variables]CurrentPage=5TotalPages=50PageContent=""DateContent=""PageY=0ScrollStep=15[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1[Metadata]Name=DigitalDiaryAuthor=YourNameVersion=1.0Information=50-page digital diary with navigation and editing functionality.---Measures---[Script]Measure=ScriptScriptFile=#@#Scripts\Script.luaUpdateDivider=-1OnUpdateAction=[!SetVariable PageY 0][!SetVariable PageContent "[&Script:LoadFile('[#@]Diary\Page[#CurrentPage].txt')]"][!SetVariable DateContent "[&Script:LoadFile('[#@]Diary\Date[#CurrentPage].txt')]"][!SetOption Folder WildcardSearch "Page[#CurrentPage].txt"][!UpdateMeasureGroup Page][!UpdateMeter *][!Redraw]DynamicVariables=1[DateInput]Group=PageMeasure=PluginPlugin=InputTextX=[DateText:X]Y=[DateText:Y]W=[DateText:W]H=[DateText:H]SolidColor=255,128,128,255FontColor=0,0,0,255FontFace=Segoe UIFontSize=10DefaultValue="#DateContent#"Command1=[!SetVariable DateContent """$UserInput$"""][&Script:SaveFile('[#@]Diary\Date[#CurrentPage].txt','[#DateContent]')][!UpdateMeasureGroup Page][!UpdateMeter *][!Redraw]OnDismissAction=[]UpdateDivider=-1DynamicVariables=1[PageInput]Group=PageMeasure=PluginPlugin=InputTextX=[PageContainer:X]Y=[PageContainer:Y]W=[PageContainer:W]H=[PageContainer:H]SolidColor=245,235,225,255FontColor=0,0,0,255FontFace=ArialFontSize=10DefaultValue="#PageContent#"Command1=[!SetVariable PageY 0][!SetVariable PageContent """$UserInput$"""][&Script:SaveFile('[#@]Diary\Page[#CurrentPage].txt','[#PageContent]')][!UpdateMeasureGroup Page][!UpdateMeter *][!Redraw]OnDismissAction=[]UpdateDivider=-1DynamicVariables=1---Styles---[Texts]FontColor=0,0,0,255FontFace=ArialFontSize=9.765AntiAlias=1ClipString=2---Meters---[CoverImage]Group=DiaryHidden=0Meter=ImageImageName=#@#Images\diary.pngW=359H=359DynamicVariables=1[OpenDiary]Group=DiaryHidden=0Meter=ShapeShape=Rectangle 103,123,159,82 | StrokeWidth 0 | Stroke Color 0,0,0,0 | Fill Color 0,0,0,1LeftMouseUpAction=[!ToggleMeterGroup Diary][!Redraw][PageImage]Group=DiaryHidden=1Meter=ImageImageName=#@#Images\page.pngW=359H=359DynamicVariables=1[DateText]Group=DiaryHidden=1Meter=StringMeterStyle=TextsX=51Y=8W=282H=20FontFace=Segoe UIFontSize=10SolidColor=255,128,128,255Text="#DateContent#"LeftMouseUpAction=[!CommandMeasure DateInput "ExecuteBatch All"]DynamicVariables=1[PageContainer]Group=DiaryHidden=1Meter=ImageX=51Y=38W=282H=285SolidColor=0,0,0,255MouseScrollUpAction=[!SetVariable PageY (Clamp((#PageY#+#ScrollStep#),([PageContainer:H]-[PageText:H]),0))][!UpdateMeter *][!Redraw]MouseScrollDownAction=[!SetVariable PageY (Clamp((#PageY#-#ScrollStep#),([PageContainer:H]-[PageText:H]),0))][!UpdateMeter *][!Redraw]DynamicVariables=1[PageText]Group=DiaryHidden=1Container=PageContainerMeter=StringMeterStyle=TextsX=0Y=#PageY#W=282Text="#PageContent#"LeftMouseUpAction=[!SetVariable PageY 0][!UpdateMeter PageText][!UpdateMeasure PageInput][!Redraw][!CommandMeasure PageInput "ExecuteBatch All"]DynamicVariables=1[PrevPage]Group=DiaryHidden=1Meter=ImageImageName=#@#Images\lbutton.pngX=107Y=323W=30H=30LeftMouseUpAction=[!SetVariable PageY 0][!SetVariable CurrentPage (Clamp(#CurrentPage#-1,1,#TotalPages#))][!WriteKeyValue Variables CurrentPage "[#CurrentPage]"][!SetVariable DateContent "[&Script:LoadFile('[#@]Diary\Date[#CurrentPage].txt')]"][!SetVariable PageContent "[&Script:LoadFile('[#@]Diary\Page[#CurrentPage].txt')]"][!UpdateMeasureGroup Page][!UpdateMeter *][!Redraw]DynamicVariables=1[PageNumber]Group=DiaryHidden=1Meter=StringMeterStyle=TextsX=192Y=328W=51FontSize=14StringAlign=CenterText=#CurrentPage#LeftMouseUpAction=[!ToggleMeterGroup Diary][!Redraw]DynamicVariables=1[NextPage]Group=DiaryHidden=1Meter=ImageImageName=#@#Images\rbutton.pngX=248Y=323W=30H=30LeftMouseUpAction=[!SetVariable PageY 0][!SetVariable CurrentPage (Clamp(#CurrentPage#+1,1,#TotalPages#))][!WriteKeyValue Variables CurrentPage "[#CurrentPage]"][!SetVariable DateContent "[&Script:LoadFile('[#@]Diary\Date[#CurrentPage].txt')]"][!SetVariable PageContent "[&Script:LoadFile('[#@]Diary\Page[#CurrentPage].txt')]"][!UpdateMeasureGroup Page][!UpdateMeter *][!Redraw]DynamicVariables=1
Date.jpg
There's no need for scrolling the date file, if it's just a one line date, so I omitted it. Make sure you thoroughly compare the above with my previous code to see what's changed and get the idea.

One other thing, I see that you didn't ask anything about the code and how it works earlier, and that's fine, but you cannot expect us to always "fix" whatever thing you want to change if you don't first understand what the existing code was doing, in order to operate the changes yourself, as desired. The fact that you try to change it on your own is great so kudos on that, but knowing what the code does, how it does it and why it does it like that is important in order to increase your chances of success. The reason we are here is mainly to answer whatever questions you might have about that, so you can build your skins yourself as you progress. ;)

Statistics: Posted by delirious — Today, 3:37 pm



Viewing all articles
Browse latest Browse all 1487

Trending Articles