Page 1 of 1

Help debugging beginner code

Posted: May 18th, 2017, 11:04 am
by Shadowcalen1
I am new to rainmeter, so I apologize if this is the wrong forum. I recently discovered the program, and I have decided to learn how to use it. My first project is a clock, which should be a simple affair, but I have spent the last hours trying to debug why I am getting no visuals from my "script". If someone could point out what I am doing wrong it would be greatly appreciated. (note, I am aware that there is no positioning data, I cant really gauge where to put stuff until I have visuals. Also FontName is replaced with a actual font)

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=Clock
Author= Shadowcalen
Information=
Version= 0.1
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

;--Measures--

[MeasureTime]
Measure=Time
Format=%H:%M

[MeasureSeconds]
Measure=Time
Format=%S

[MeasureDate]
Measure=Time
Format=%#x

;--Text Style--

[TextStyle]
FontFace=FontName
SolidColor=0,0,0,1
FontColor=233,233,233
StringAlign=Right
AntiAlias=1

;--Meters--

[MeterTime]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureTime
FontSize=40

[MeterSeconds]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureSeconds
FontSize=40

[MeterDate]
Meter=String
MeterStyle=TextStyle
MeasureName=MeasureDate
FontSize=40
Also, the font that I am using has some odd quarks. In a previous iteration of the script (just display the time %H:%M.%S), the text was getting cut off at the end (it would often display half a number in the seconds column) If someone could explain this to me I would also appreciate it.

Re: Help debugging beginner code

Posted: May 18th, 2017, 11:50 am
by balala
Shadowcalen1 wrote:I am new to rainmeter, so I apologize if this is the wrong forum. I recently discovered the program, and I have decided to learn how to use it. My first project is a clock, which should be a simple affair, but I have spent the last hours trying to debug why I am getting no visuals from my "script". If someone could point out what I am doing wrong it would be greatly appreciated. (note, I am aware that there is no positioning data, I cant really gauge where to put stuff until I have visuals. Also FontName is replaced with a actual font)
The biggest problem is that because you didn't add positioning options (X and Y to the meters), the default values are used (X=0, respectively Y=0). But the strings are aligned to right (due to the StringAlign=Right option within the [TextStyle] section), which means they go outside, to left, from the skin. You must know that skins can't show meters which are positioned to left or up of the X=0, respectively Y=0 points. Your strings, having the default X=0 and Y=0 positions, are not visible.
To fix, just replace the StringAlign option to StringAlign=Left in the [TextStyle] section.

Tip: When you post code, please use the tags (using the Code button).

Re: Help debugging beginner code

Posted: May 18th, 2017, 11:57 am
by jsmorley
You are going to want / need DynamicWindowSize=1 in the [Rainmeter] section as well.

Re: Help debugging beginner code

Posted: May 18th, 2017, 12:30 pm
by Shadowcalen1
Thanks, that is exactly what I was looking for. Now that I have it visible, you wouldn't happen to know how to make it invisible? I jest, but my new clock is overlaying itself over all my applications, not just the desktop. Any suggestions on how to get it so it only displays on the desktop? (Keep on screen is not enabled)

Re: Help debugging beginner code

Posted: May 18th, 2017, 2:19 pm
by balala
Shadowcalen1 wrote:I jest, but my new clock is overlaying itself over all my applications, not just the desktop. Any suggestions on how to get it so it only displays on the desktop? (Keep on screen is not enabled)
Right click the skin, go to Settings -> Position and choose one of the possibilities described here: https://docs.rainmeter.net/manual-beta/user-interface/context-menus/#Position
I suppose now you have it set either Stay topmost or Topmost and probably you'll want to choose either Bottom or On desktop.

Re: Help debugging beginner code

Posted: May 18th, 2017, 10:02 pm
by Shadowcalen1
Again, exactly what I was looking for, Thank you

Re: Help debugging beginner code

Posted: May 19th, 2017, 8:36 am
by balala
Glad to help.