It is currently May 3rd, 2024, 10:45 pm

@Include=[MeasureString]

Get help with creating, editing & fixing problems with skins
User avatar
mcgilvaryjc
Posts: 15
Joined: November 15th, 2015, 5:51 pm

Re: @Include=[MeasureString]

Post by mcgilvaryjc »

Never thought of automating it...great idea...thank you.
User avatar
Yincognito
Rainmeter Sage
Posts: 7197
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: @Include=[MeasureString]

Post by Yincognito »

mcgilvaryjc wrote: September 28th, 2023, 3:54 pm Never thought of automating it...great idea...thank you.
So, did you manage to do what you wanted using those monitor variables? By the way adding DynamicVariables=1 to the sections (measures or meters) where you use those variables might be needed.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
mcgilvaryjc
Posts: 15
Joined: November 15th, 2015, 5:51 pm

Re: @Include=[MeasureString]

Post by mcgilvaryjc »

Not yet. Today is Doctor day for the better half. Work on it tonight. Thanks again. Just curious, how do you put the Code window in your Post?
User avatar
Yincognito
Rainmeter Sage
Posts: 7197
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: @Include=[MeasureString]

Post by Yincognito »

mcgilvaryjc wrote: September 28th, 2023, 9:21 pm Not yet. Today is Doctor day for the better half. Work on it tonight. Thanks again. Just curious, how do you put the Code window in your Post?
Ah, I see - no worries, I was a bit busy today as well, take your time and do it when comfortable. You can place stuff in a code box by using the </> button above your message editing box, when posting something. Just select the desired text from your message, click the </> button to the top, and the selection will be enclosed between [ code ] tags and will be displayed in a code box (something you can test if you click below your message editing box to Preview your message).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
mcgilvaryjc
Posts: 15
Joined: November 15th, 2015, 5:51 pm

Re: @Include=[MeasureString]

Post by mcgilvaryjc »

It Works! And if you drag the skin to a monitor of different size it "auto-magically" resizes. Neat. Thanks for all the help and ideas.

Code: Select all

;##############################################
[Rainmeter]

;=========================================
[Metadata]
Name=Clock 
Author=Unknown
Information=SCALE,linked to screen height, scales the whole skin  Need to set \ Skins tab\Display monitor\ "Auto-select based on window position"

License=

Version= Friday. September. 29. 2023

;=========================================
[Variables]

FONTCOLOR1=255,255,255
FONTCOLOR2=0,0,0
FONT1="Arial Narrow"
ScreenHeight=#SCREENAREAHEIGHt#

[SCALE]
Measure = Calc
Formula=#SCREENAREAHEIGHt# /102.40
DynamicVariables=1

[TIMEFontSize]
Measure = Calc
Formula=SCALE * 5.5

[AM/PMFontSize]
Measure = Calc
Formula=SCALE *2.5

[DATEFontSize]
Measure = Calc
Formula=SCALE *2.5

[TIME_X]
Measure = Calc
Formula=SCALE * 20

[TIME_Y]
Measure = Calc
Formula=SCALE *0

[DATE_X]
Measure = Calc
Formula=SCALE  *15

[DATE_Y]
Measure = Calc
Formula=SCALE  *12

[Background_W]
Measure = Calc
Formula=SCALE  *30

[Background_H]
Measure = Calc
Formula=SCALE  *16

[Center_X]
Measure = Calc
Formula=Background_W  / 2

;=========================================	
[Background]
Meter=IMAGE
SolidColor=150,150,150,10
H=[Background_H]
W=[Background_W]
X=0
Y=0
DynamicVariables=1.
;================= Measures ========================
[TIME]
	Measure=Time
	Format=%#I:%M
[SECONDS]
	Measure=Time
	Format=%S
	MaxValue=59
[AM/PM]
	Measure=Time
	Format=%p
[DATE]
	Measure=Time
	Format=%A. #CRLF# %B. %d. %Y
;================= Meters ========================
[(time)]
	MeasureName=TIME
                 MeasureName2=AM/PM
	Meter=String
	X=[Center_X]
	Y=[TIME_Y]
	 FontColor=#FONTCOLOR1#
	 FontFace=#FONT1#
	FontSize=[TIMEFontSize]
	AntiAlias=1
	StringAlign=CenterTop
	 FontEffectColor=#FONTCOLOR2#
	StringEffect=Border
                
	InlineSetting=Size | [AM/PMFontSize]
	InlinePattern=:\d\d(.*)
	Text = %1 %2
	DynamicVariables=1.
;----------------------------------------------------------------------------------------------
[(date)]
	MeasureName=DATE
	Meter=String
	X=[Center_X]
	Y=[DATE_Y]
	FontColor=#FONTCOLOR1#
	FontFace=#FONT1#
	StringAlign=CenterCenter
	StringStyle=BOLD
	FontEffectColor=#FONTCOLOR2#
	StringEffect=Border
	FontSize=[DATEFontSize]
	AntiAlias=1
	DynamicVariables=1.
;----------------------------------------------------------------------------------------------
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: @Include=[MeasureString]

Post by CodeCode »

Now sure what effect you are trying to get, but I have a 'world clock' that keeps track of adjustable time zones here
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7197
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: @Include=[MeasureString]

Post by Yincognito »

mcgilvaryjc wrote: September 29th, 2023, 8:17 pm It Works! And if you drag the skin to a monitor of different size it "auto-magically" resizes. Neat. Thanks for all the help and ideas.

Code: Select all

;##############################################
[Rainmeter]

;=========================================
[Metadata]
Name=Clock 
Author=Unknown
Information=SCALE,linked to screen height, scales the whole skin  Need to set \ Skins tab\Display monitor\ "Auto-select based on window position"

License=

Version= Friday. September. 29. 2023

;=========================================
[Variables]

FONTCOLOR1=255,255,255
FONTCOLOR2=0,0,0
FONT1="Arial Narrow"
ScreenHeight=#SCREENAREAHEIGHt#

[SCALE]
Measure = Calc
Formula=#SCREENAREAHEIGHt# /102.40
DynamicVariables=1

[TIMEFontSize]
Measure = Calc
Formula=SCALE * 5.5

[AM/PMFontSize]
Measure = Calc
Formula=SCALE *2.5

[DATEFontSize]
Measure = Calc
Formula=SCALE *2.5

[TIME_X]
Measure = Calc
Formula=SCALE * 20

[TIME_Y]
Measure = Calc
Formula=SCALE *0

[DATE_X]
Measure = Calc
Formula=SCALE  *15

[DATE_Y]
Measure = Calc
Formula=SCALE  *12

[Background_W]
Measure = Calc
Formula=SCALE  *30

[Background_H]
Measure = Calc
Formula=SCALE  *16

[Center_X]
Measure = Calc
Formula=Background_W  / 2

;=========================================	
[Background]
Meter=IMAGE
SolidColor=150,150,150,10
H=[Background_H]
W=[Background_W]
X=0
Y=0
DynamicVariables=1.
;================= Measures ========================
[TIME]
	Measure=Time
	Format=%#I:%M
[SECONDS]
	Measure=Time
	Format=%S
	MaxValue=59
[AM/PM]
	Measure=Time
	Format=%p
[DATE]
	Measure=Time
	Format=%A. #CRLF# %B. %d. %Y
;================= Meters ========================
[(time)]
	MeasureName=TIME
                 MeasureName2=AM/PM
	Meter=String
	X=[Center_X]
	Y=[TIME_Y]
	 FontColor=#FONTCOLOR1#
	 FontFace=#FONT1#
	FontSize=[TIMEFontSize]
	AntiAlias=1
	StringAlign=CenterTop
	 FontEffectColor=#FONTCOLOR2#
	StringEffect=Border
                
	InlineSetting=Size | [AM/PMFontSize]
	InlinePattern=:\d\d(.*)
	Text = %1 %2
	DynamicVariables=1.
;----------------------------------------------------------------------------------------------
[(date)]
	MeasureName=DATE
	Meter=String
	X=[Center_X]
	Y=[DATE_Y]
	FontColor=#FONTCOLOR1#
	FontFace=#FONT1#
	StringAlign=CenterCenter
	StringStyle=BOLD
	FontEffectColor=#FONTCOLOR2#
	StringEffect=Border
	FontSize=[DATEFontSize]
	AntiAlias=1
	DynamicVariables=1.
;----------------------------------------------------------------------------------------------
Excellent, I'm glad it all payed off and the result is the desired one! :great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
mcgilvaryjc
Posts: 15
Joined: November 15th, 2015, 5:51 pm

Re: @Include=[MeasureString]

Post by mcgilvaryjc »

Just to finish off. It seems when the skin first loads on the second monitor #SCREENAREAHEIGHT# has the primary monitor size setting so the skin size is not scaled to the second monitors height. Had to add a one time !Refresh to the beginning to get the skin to appear the correct size on the second monitor.

Code: Select all

[RefreshOnce]
;Do a refresh to get the current monitor size, at load time it is the Primary monitor height.
Measure=Calc
Formula=Counter
UpdateDivider=-1
IfCondition=(UpdateCycle=1)
IfTrueAction=[!Refresh]
DynamicVariables=1
User avatar
Yincognito
Rainmeter Sage
Posts: 7197
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: @Include=[MeasureString]

Post by Yincognito »

mcgilvaryjc wrote: October 3rd, 2023, 7:17 pm Just to finish off. It seems when the skin first loads on the second monitor #SCREENAREAHEIGHT# has the primary monitor size setting so the skin size is not scaled to the second monitors height. Had to add a one time !Refresh to the beginning to get the skin to appear the correct size on the second monitor.

Code: Select all

[RefreshOnce]
;Do a refresh to get the current monitor size, at load time it is the Primary monitor height.
Measure=Calc
Formula=Counter
UpdateDivider=-1
IfCondition=(UpdateCycle=1)
IfTrueAction=[!Refresh]
DynamicVariables=1
From the notes on the monitor variables link I suggested earlier:
When the variables are used without specifying an @N monitor number, by default the values will be based on the primary monitor, where Rainmeter is started. In order to have the values reflect the monitor the skin is currently on, set AutoSelectScreen to "1" in Manage. or alternately, use the !AutoSelectScreen bang in the skin.
Might be a solution as well.

P.S. Your [RefreshOnce] measure name is different from the UpdateCycle name used in the IfCondition, meaning that the condition will never run. Unless, of course, you only set the measure name to RefreshOnce when posting, to better illustrate your "finish off" method.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
mcgilvaryjc
Posts: 15
Joined: November 15th, 2015, 5:51 pm

Re: @Include=[MeasureString]

Post by mcgilvaryjc »

Again you are so right. I changed the name of the measure to make it more self explanatory but overlooked the other reference. Today when I powered up I noticed the problem but not the solution. Does this look better?

Code: Select all

[RefreshOnce]
;Do a refresh to get the current monitor size, at load time it is the Primary monitor height.
Measure=Calc
Formula=Counter
UpdateDivider=-1
IfCondition=(RefreshOnce=1)
IfTrueAction=[!Refresh]
DynamicVariables=1