Page 2 of 3

Re: Sun Clock not working

Posted: February 3rd, 2021, 7:09 am
by balala
dasiun wrote: February 2nd, 2021, 9:53 pm You are right.

I should put STRING instead of CALC.
And IfCondition2 etc.

"C" means clock. The user can chance it
Alright, however the question still persist:
balala wrote: January 31st, 2021, 4:53 pm I suppose you intended to set the measure in a way to apply the appropriate substitution, acording to the hour. Am I right?
For me at least is still is not clear enough what is your intention. Am I correct when believing the above? Because if I am, there might be easier solutions, but first I should know what do you want to achieve.

Re: Sun Clock not working

Posted: February 4th, 2021, 9:45 pm
by dasiun
The user can change the value of "c" from 00 to 23 (12 is london)

What bang should i use to execute a STRING ??

My intention is to make an adjustable sun clock. The user can modify the outset.

Re: Sun Clock not working

Posted: February 4th, 2021, 10:01 pm
by dasiun
What bang should i use to execute a STRING ??

If #C# is 00:
THE FIRST IMAGE IS "00"
THE SECOND IMAGE IS "20"

If #C# is 01:
THE FIRST IMAGE IS "23"
THE SECOND IMAGE IS "19"

If #C# is 12:
London

That is what im trying to do.

Re: Sun Clock I ADDED IMAGES help

Posted: February 13th, 2021, 11:46 pm
by dasiun
The ..\SE.INC contains the "C=00" "C=01" etc.

Code: Select all

[Rainmeter]
Update=30000
@Include=..\SE.INC



[MT]
Measure=TIME
Format=%H
IfCondition=(#C# = 00)
IfTrueAction=[SUB_00]
IfCondition2=(#C# = 01)
IfTrueAction2=[SUB_01]
IfCondition3=(#C# = 02)
IfTrueAction3=[SUB_02]
IfCondition4=(#C# = 03)
IfTrueAction4=[SUB_03]
IfCondition5=(#C# = 04)
IfTrueAction5=[SUB_04]
IfCondition6=(#C# = 05)
IfTrueAction6=[SUB_05]
IfCondition7=(#C# = 06)
IfTrueAction7=[SUB_06]
IfCondition8=(#C# = 07)
IfTrueAction8=[SUB_07]
IfCondition9=(#C# = 08)
IfTrueAction9=[SUB_08]
IfCondition10=(#C# = 09)
IfTrueAction10=[SUB_09]
IfCondition11=(#C# = 10)
IfTrueAction11=[SUB_10]
IfCondition12=(#C# = 11)
IfTrueAction12=[SUB_11]
IfCondition13=(#C# = 12)
IfTrueAction13=[SUB_12]
IfCondition14=(#C# = 13)
IfTrueAction14=[SUB_13]
IfCondition15=(#C# = 14)
IfTrueAction15=[SUB_14]
IfCondition16=(#C# = 15)
IfTrueAction16=[SUB_15]
IfCondition17=(#C# = 16)
IfTrueAction17=[SUB_16]
IfCondition18=(#C# = 17)
IfTrueAction18=[SUB_17]
IfCondition19=(#C# = 18)
IfTrueAction19=[SUB_18]
IfCondition20=(#C# = 19)
IfTrueAction20=[SUB_19]
IfCondition21=(#C# = 20)
IfTrueAction21=[SUB_20]
IfCondition22=(#C# = 21)
IfTrueAction22=[SUB_21]
IfCondition23=(#C# = 22)
IfTrueAction23=[SUB_22]
IfCondition24=(#C# = 23)
IfTrueAction24=[SUB_23]



[SUB_00]
Measure=STRING
Substitute="00":"00","01":"01","02":"02","03":"03","04":"04","05":"05","06":"06","07":"07","08":"08","09":"09","10":"10","11":"11","12":"12","13":"13","14":"14","15":"15","16":"16","17":"17","18":"18","19":"19","20":"20","21":"21","22":"22","23":"23"

[SUB_01]
Measure=STRING
Substitute="00":"01","01":"02","02":"03","03":"04","04":"05","05":"06","06":"07","07":"08","08":"09","09":"10","10":"11","11":"12","12":"13","13":"14","14":"15","15":"16","16":"17","17":"18","18":"19","19":"20","20":"21","21":"22","22":"23","23":"00"

[SUB_02]
Measure=STRING
Substitute="00":"02","01":"03","02":"04","03":"05","04":"06","05":"07","06":"08","07":"09","08":"10","09":"11","10":"12","11":"13","12":"14","13":"15","14":"16","15":"17","16":"18","17":"19","18":"20","19":"21","20":"22","21":"23","22":"00","23":"01"

[SUB_03]
Measure=STRING
Substitute="00":"03","01":"04","02":"05","03":"06","04":"07","05":"08","06":"09","07":"10","08":"11","09":"12","10":"13","11":"14","12":"15","13":"16","14":"17","15":"18","16":"19","17":"20","18":"21","19":"22","20":"23","21":"00","22":"01","23":"02"

[SUB_04]
Measure=STRING
Substitute="00":"04","01":"05","02":"06","03":"07","04":"08","05":"09","06":"10","07":"11","08":"12","09":"13","10":"14","11":"15","12":"16","13":"17","14":"18","15":"19","16":"20","17":"21","18":"22","19":"23","20":"00","21":"01","22":"02","23":"03"

[SUB_05]
Measure=STRING
Substitute="00":"05","01":"06","02":"07","03":"08","04":"09","05":"10","06":"11","07":"12","08":"13","09":"14","10":"15","11":"16","12":"17","13":"18","14":"19","15":"20","16":"21","17":"22","18":"23","19":"00","20":"01","21":"02","22":"03","23":"04"

[SUB_06]
Measure=STRING
Substitute="00":"06","01":"07","02":"08","03":"09","04":"10","05":"11","06":"12","07":"13","08":"14","09":"15","10":"16","11":"17","12":"18","13":"19","14":"20","15":"21","16":"22","17":"23","18":"00","19":"01","20":"02","21":"03","22":"04","23":"05"

[SUB_07]
Measure=STRING
Substitute="00":"07","01":"08","02":"09","03":"10","04":"11","05":"12","06":"13","07":"14","08":"15","09":"16","10":"17","11":"18","12":"19","13":"20","14":"21","15":"22","16":"23","17":"00","18":"01","19":"02","20":"03","21":"04","22":"05","23":"06"

[SUB_08]
Measure=STRING
Substitute="00":"08","01":"09","02":"10","03":"11","04":"12","05":"13","06":"14","07":"15","08":"16","09":"17","10":"18","11":"19","12":"20","13":"21","14":"22","15":"23","16":"00","17":"01","18":"02","19":"03","20":"04","21":"05","22":"06","23":"07"

[SUB_09]
Measure=STRING
Substitute="00":"09","01":"10","02":"11","03":"12","04":"13","05":"14","06":"15","07":"16","08":"17","09":"18","10":"19","11":"20","12":"21","13":"22","14":"23","15":"00","16":"01","17":"02","18":"03","19":"04","20":"05","21":"06","22":"07","23":"08"

[SUB_10]
Measure=STRING
Substitute="00":"10","01":"11","02":"12","03":"13","04":"14","05":"15","06":"16","07":"17","08":"18","09":"19","10":"20","11":"21","12":"22","13":"23","14":"00","15":"01","16":"02","17":"03","18":"04","19":"05","20":"06","21":"07","22":"08","23":"09"

[SUB_11]
Measure=STRING
Substitute="00":"11","01":"12","02":"13","03":"14","04":"15","05":"16","06":"17","07":"18","08":"19","09":"20","10":"21","11":"22","12":"23","13":"00","14":"01","15":"02","16":"03","17":"04","18":"05","19":"06","20":"07","21":"08","22":"09","23":"10"

[SUB_12]
Measure=STRING
Substitute="00":"12","01":"13","02":"14","03":"15","04":"16","05":"17","06":"18","07":"19","08":"20","09":"21","10":"22","11":"23","12":"00","13":"01","14":"02","15":"03","16":"04","17":"05","18":"06","19":"07","20":"08","21":"09","22":"10","23":"11"

[SUB_13]
Measure=STRING
Substitute="00":"13","01":"14","02":"15","03":"16","04":"17","05":"18","06":"19","07":"20","08":"21","09":"22","10":"23","11":"00","12":"01","13":"02","14":"03","15":"04","16":"05","17":"06","18":"07","19":"08","20":"09","21":"10","22":"11","23":"12"

[SUB_14]
Measure=STRING
Substitute="00":"14","01":"15","02":"16","03":"17","04":"18","05":"19","06":"20","07":"21","08":"22","09":"23","10":"00","11":"01","12":"02","13":"03","14":"04","15":"05","16":"06","17":"07","18":"08","19":"09","20":"10","21":"11","22":"12","23":"13"

[SUB_15]
Measure=STRING
Substitute="00":"15","01":"16","02":"17","03":"18","04":"19","05":"20","06":"21","07":"22","08":"23","09":"00","10":"01","11":"02","12":"03","13":"04","14":"05","15":"06","16":"07","17":"08","18":"09","19":"10","20":"11","21":"12","22":"13","23":"14"

[SUB_16]
Measure=STRING
Substitute="00":"16","01":"17","02":"18","03":"19","04":"20","05":"21","06":"22","07":"23","08":"00","09":"01","10":"02","11":"03","12":"04","13":"05","14":"06","15":"07","16":"08","17":"09","18":"10","19":"11","20":"12","21":"13","22":"14","23":"15"

[SUB_17]
Measure=STRING
Substitute="00":"17","01":"18","02":"19","03":"20","04":"21","05":"22","06":"23","07":"00","08":"01","09":"02","10":"03","11":"04","12":"05","13":"06","14":"07","15":"08","16":"09","17":"10","18":"11","19":"12","20":"13","21":"14","22":"15","23":"16"

[SUB_18]
Measure=STRING
Substitute="00":"18","01":"19","02":"20","03":"21","04":"22","05":"23","06":"00","07":"01","08":"02","09":"03","10":"04","11":"05","12":"06","13":"07","14":"08","15":"09","16":"10","17":"11","18":"12","19":"13","20":"14","21":"15","22":"16","23":"17"

[SUB_19]
Measure=STRING
Substitute="00":"19","01":"20","02":"21","03":"22","04":"23","05":"00","06":"01","07":"02","08":"03","09":"04","10":"05","11":"06","12":"07","13":"08","14":"09","15":"10","16":"11","17":"12","18":"13","19":"14","20":"15","21":"16","22":"17","23":"18"

[SUB_20]
Measure=STRING
Substitute="00":"20","01":"21","02":"22","03":"23","04":"00","05":"01","06":"02","07":"03","08":"04","09":"05","10":"06","11":"07","12":"08","13":"09","14":"10","15":"11","16":"12","17":"13","18":"14","19":"15","20":"16","21":"17","22":"18","23":"19"

[SUB_21]
Measure=STRING
Substitute="00":"21","01":"22","02":"23","03":"00","04":"01","05":"02","06":"03","07":"04","08":"05","09":"06","10":"07","11":"08","12":"09","13":"10","14":"11","15":"12","16":"13","17":"14","18":"15","19":"16","20":"17","21":"18","22":"19","23":"20"

[SUB_22]
Measure=STRING
Substitute="00":"22","01":"23","02":"00","03":"01","04":"02","05":"03","06":"04","07":"05","08":"06","09":"07","10":"08","11":"09","12":"10","13":"11","14":"12","15":"13","16":"14","17":"15","18":"16","19":"17","20":"18","21":"19","22":"20","23":"21"

[SUB_23]
Measure=STRING
Substitute="00":"23","01":"00","02":"01","03":"02","04":"03","05":"04","06":"05","07":"06","08":"07","09":"08","10":"09","11":"10","12":"11","13":"12","14":"13","15":"14","16":"15","17":"16","18":"17","19":"18","20":"19","21":"20","22":"21","23":"22"


[BC]
Meter=IMAGE
ImageName=BAC.PNG
X=(#WORKAREAWIDTH# / 2 - 184)
Y=(#WORKAREAHEIGHT# / 2 - 170)

[CLOCK]
Meter=IMAGE
ImageName=[MT].PNG
X=(#WORKAREAWIDTH# / 2 - 118)
Y=(#WORKAREAHEIGHT# / 2 - 106)
DynamicVariables=1

Re: Sun Clock I ADDED IMAGES help

Posted: February 14th, 2021, 11:07 am
by balala
dasiun wrote: February 13th, 2021, 11:46 pm The ..\SE.INC contains the "C=00" "C=01" etc.
As previously said, you can't apply a measure directly into an IfTrueAction option (like in the IfTrueAction options of the [MT] measure). Don't make sense. An IfTrueAction option must contain bangs which can be executed once the associated IfTrueAction becomes true. An IfTrueAction=[SUB_00] doesn't make sense, especially that the [SUB_00] (and the following ones) are not entirely correct, the String option is missing on each of them.
Still don't know what you want to achieve (I have a supposition, believing that you'd like to make substitutions on the [MT] measure, based on the current hour - however I1m not sure I'm correct here). Sorry but me personally at least can't follow. First please pack the whole config and upload the package here. This way we'd have the needed files and would be much easier for anyone to check what would you like to achieve. Also attach a detailed description of what would you like to do.

Re: Sun Clock I ADDED IMAGES help

Posted: February 14th, 2021, 3:06 pm
by dasiun
(I have a supposition, believing that you'd like to make substitutions on the [MT] measure, based on the current hour


You are right. But adjustable. That is not the problem.
The thing is how i call a STRING from a ifTrueAction.

Thanks for tour time.

Re: Sun Clock I ADDED IMAGES help

Posted: February 14th, 2021, 3:51 pm
by SilverAzide
dasiun wrote: February 14th, 2021, 3:06 pm (I have a supposition, believing that you'd like to make substitutions on the [MT] measure, based on the current hour


You are right. But adjustable. That is not the problem.
The thing is how i call a STRING from a ifTrueAction.

Thanks for tour time.
There is no such thing as "call a string" in Rainmeter. I don't think you quite understand how meters and measures work, so all that code is gibberish that won't do anything. Rainmeter is not a true programming language, per se; it does not have subroutines, branching, loops, etc.

I'm not sure exactly why you are doing all this string substitution anyway. If you are trying to make a "sun dial", then you just need to make the sun move in a circle. This is just regular math, where you can calculate what fraction of the day the current time is, based on a 360 degree circle. (The sun actually will move in an ellipse on your map because of the axial tilt of the earth, but I assume you want to start with something easy.)

You might want to search for other sun dial skins. I think user Xenium has created some nice 24 hour clocks that might give you some hints about how to create a sun dial. The basics should be similar.

Re: Sun Clock I ADDED IMAGES help

Posted: February 14th, 2021, 4:52 pm
by ikarus1969
The OP wants to shift the current hour by #C# and use that (2-character-)string to display an image.
@OP: would you try the following:
(MT_CurrentHour and MT_CurrentHour_Shift are new measures)

Code: Select all

[MT_CurrentHour]
Measure=TIME
Format=%H

[MT_CurrentHour_Shift]
Measure=CALC
Formula=(MT_CurrentHour + #C#) % 24
DynamicVariables=1

[MT]
Measure=STRING
String=[MT_CurrentHour_Shift]
RegexpSubstitute=1
Substitute="^(\d)$":"0\1"
DynamicVariables=1

Re: Sun Clock I ADDED IMAGES help

Posted: February 15th, 2021, 3:00 am
by dasiun
Thanks. The image must be ImageName=[MT]

ikarus1969 - You want to apear the crédits of my skin ??

Re: Sun Clock I ADDED IMAGES help

Posted: February 15th, 2021, 7:28 am
by ikarus1969
dasiun wrote: February 15th, 2021, 3:00 am Thanks. The image must be ImageName=[MT]
That's ok because PNG is the default extension for images when no extension is given.
dasiun wrote: February 15th, 2021, 3:00 am ikarus1969 - You want to apear the crédits of my skin ??
As you wish, but you don't have to. That are just 2 measures and one adapted

Just post your skin when you are finished with it; here on the forum or on another place where we can download it and have a look at your creation.