It is currently August 19th, 2022, 8:02 pm

X and Y values and padding values not updating for one specific element

Get help with creating, editing & fixing problems with skins
Emblem
Posts: 1
Joined: August 3rd, 2022, 10:17 pm

X and Y values and padding values not updating for one specific element

Post by Emblem »

Hi! I downloaded the Elementary skin and I'm trying to customize it to my liking. Right now, I'm trying to position the notes in the top left of the screen. I changed the font sizing and stuff so I needed to reposition the elements so that the text doesn't overlap. The two text elements have been easy; I've just changed the padding. However, I tried to change the position of the input, and no matter what I do, it won't change. I need to move it down a bit, but I can't figure out how. I don't even know what coding language this is, so any help is appreciated. Here's the code (I need the y value or padding value to change for the input device):

Code: Select all

[Rainmeter]
Update=-1
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!Update]

[Metadata]
Name=Elementary Notepad
Author=Flying Hyrax - based on "Note Paper" by sa3er
Information=Simple notepad skin using the InputText plugin. | - Use ctrl+enter to insert a line break | - You can change the size of the text area and fonts in the skin config file.
Version=3.0
License=CC BY-NC-SA 4.0 | http://creativecommons.org/licenses/by-nc-sa/4.0/

;           _   _   _                  __   __
;  ___  ___| |_| |_(_)_ __   __ _ ___  \ \  \ \
; / __|/ _ \ __| __| | '_ \ / _` / __|  \ \  \ \
; \__ \  __/ |_| |_| | | | | (_| \__ \  / /  / /
; |___/\___|\__|\__|_|_| |_|\__, |___/ /_/  /_/
;                           |___/

[Variables]

; Path to the text file where note text is stored. To properly
; display unicode characters, make sure the file is encoded as
; UTF-8 with BOM (byte-order mark).
notesfile="notes.txt"

; Dimensions of the text area
width=400
height=700

; Display size of the notes text; header size is scaled relative to this
notesFontSize=15

; Size of font when editing the notes; usually the same as notesFontSize,
; but can be tweaked to preference.
inputFontSize=15

;   __   __           _   _   _
;  / /  / /  ___  ___| |_| |_(_)_ __   __ _ ___
; / /  / /  / __|/ _ \ __| __| | '_ \ / _` / __|
; \ \  \ \  \__ \  __/ |_| |_| | | | | (_| \__ \
;  \_\  \_\ |___/\___|\__|\__|_|_| |_|\__, |___/
;                                     |___/

@IncludeGlobal="#@#shared.inc"
@IncludeLang="#@#Languages\#language#.txt"

[measureScript]
Measure=Script
ScriptFile="notes.lua"

[measureInput]
Measure=Plugin
Plugin=InputText.dll
DynamicVariables=1
DefaultValue=[measureScript]
SolidColor=50,50,50
FontColor=0,250,250
FontFace=Rubik Medium
FontSize=#inputFontSize#
FocusDismiss=1
X=0
Y=0
W=#width#
H=#height#
Command1=[!SetOption measureScript temp """$UserInput$"""] X=[meterText:X] Y=[meterText:Y]
Command2=[!CommandMeasure measureScript writeToFile()][!Refresh #CURRENTCONFIG#]

[meterHeader]
Meter=String
MeterStyle=allString
FontSize=50
FontColor=#highlight#
Padding=5,0,5,0
X=5
Y=0
Text=#notes#
MouseOverAction=[!ShowMeterGroup size][!Update][!Redraw]
FontFace=Rubik Medium

[meterText]
FontFace=Rubik Medium
Meter=String
MeterStyle=allString
MeasureName=measureScript
FontSize=#notesFontSize#
Padding=9,50,5,0
X=5
Y=40
W=#width#
H=#height#
ClipString=1
Text=%1
MouseOverAction=[!SetOption meterText SolidColor 0,0,0,20][!Update][!Redraw]
MouseLeaveAction=[!SetOption meterText SolidColor 0,0,0,1][!Update][!Redraw]
LeftMouseUpAction=[!CommandMeasure "measureInput" "ExecuteBatch 1-2"]
Last edited by SilverAzide on August 3rd, 2022, 11:13 pm, edited 1 time in total.
Reason: Please use code tags when posting code. It's the </> button.
User avatar
tass_co
Posts: 276
Joined: May 4th, 2020, 3:01 pm

Re: X and Y values and padding values not updating for one specific element

Post by tass_co »

Emblem wrote: August 3rd, 2022, 10:22 pm However, I tried to change the position of the input, and no matter what I do, it won't change. I need to move it down a bit, but I can't figure out how. I don't even know what coding language this is, so any help is appreciated. Here's the code (I need the y value or padding value to change for the input device):

First of all, If you share a code, please use the code section on the panel :thumbup:

You can do this by changing this line
Command1=[!SetOption measureScript temp """$UserInput$"""] X=10 Y=20

Code: Select all

[measureInput]
.
.
.
.
W=#width# ;=>> You can change the input width in this line.
H=#height# ;=>> You can change the input height in this line.
Command1=[!SetOption measureScript temp """$UserInput$"""] X=10 Y=20
I dont know where i going from here but i promise. it wont be boring....
User avatar
balala
Rainmeter Sage
Posts: 14469
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: X and Y values and padding values not updating for one specific element

Post by balala »

Emblem wrote: August 3rd, 2022, 10:22 pm Hi! I downloaded the Elementary skin and I'm trying to customize it to my liking. Right now, I'm trying to position the notes in the top left of the screen. I changed the font sizing and stuff so I needed to reposition the elements so that the text doesn't overlap. The two text elements have been easy; I've just changed the padding. However, I tried to change the position of the input, and no matter what I do, it won't change. I need to move it down a bit, but I can't figure out how. I don't even know what coding language this is, so any help is appreciated. Here's the code (I need the y value or padding value to change for the input device):
Can't follow you. And since no one replied, not after almost one day after your post, excepting tass_co, I think some details (to be clear: a better description of your problem) would be needed. Please try to explain what are your asking. For instance: what is overlaping what? Which two elements are you talking about? If by "I tried to change the position of the input", you mean to change the position of the InputText measure, this can be done by changing the X and Y parameters in the Command1 option of the [measureInput] measure (so replace the X=[meterText:X] and Y=[meterText:Y] parameters in the Command1=[!SetOption measureScript temp """$UserInput$"""] X=[meterText:X] Y=[meterText:Y] option of the measure), as suggested by tass_co above.
But most important: since we don't know the notes.lua script file, nor the included files either, no one is able to say something meaningful. The whole package would be needed, so please pack the whole config you have and upload the package. This way we would have all needed files.