Help debugging beginner code

Get help with installing and using Rainmeter.

Help debugging beginner code

May 18th, 2017, 11:04 am
Shadowcalen1
   [6 posts]

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.
Last edited by fonpaolo on May 18th, 2017, 11:52 am, edited 1 time in total.
Reason: Please use the [code] tags
User avatar

Re: Help debugging beginner code

May 18th, 2017, 11:50 am
balala
Rainmeter Sage   [4339 posts]

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 [Code][/Code] tags (using the Code button).
User avatar

Re: Help debugging beginner code

May 18th, 2017, 11:57 am
jsmorley
Developer   [15733 posts]

You are going to want / need DynamicWindowSize=1 in the [Rainmeter] section as well.

Re: Help debugging beginner code

May 18th, 2017, 12:30 pm
Shadowcalen1
   [6 posts]

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)
User avatar

Re: Help debugging beginner code

May 18th, 2017, 2:19 pm
balala
Rainmeter Sage   [4339 posts]

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/ ... /#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

May 18th, 2017, 10:02 pm
Shadowcalen1
   [6 posts]

Again, exactly what I was looking for, Thank you
User avatar

Re: Help debugging beginner code

May 19th, 2017, 8:36 am
balala
Rainmeter Sage   [4339 posts]

Glad to help.

Return to “Help: Rainmeter Application”



Who is online

Users browsing this forum: No registered users and 1 guest