It is currently March 28th, 2024, 8:13 pm

RainRGB4.exe help and questions

Get help with creating, editing & fixing problems with skins
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

long night last night and finished today.
i started from scratch to clean up my skin.
thanks to jsmorley for pointing out my code was a mess, as i new it. I tend to rush to get it working, without really knowing whats going on. i still don't know a lot, but feel my skin should run smoother. can someone have a look and see if i have some bad formatting or ways i cloud clean it up even more? just asking.
i do have lots of questions and would like to add more things but that i will do in time.
one question i have is, can i have an option in the context menu to adjust the alpha of an image?
i have been reading and came across bangs, not sure if that would produce the transparent(alpha) affect with an image.
[Rainmeter]
Author=HackitZ TDW
Version=2.21
Update=900
DynamicWindowSize=1
AccurateText=1
ContextTitle=Set Location Code
ContextAction=["#@#Variables.inc"]
;------------for testing alignment
;BackgroundMode=2
;------------------------------end
ContextTitle2=> Location Color
;ContextAction2=["#@#Addons\RainRGB4.exe" "VarName=Location" "FileName=#@#Variables.inc"]
ContextAction2=["#@#Addons\RainRGB4.exe" "VarName=Location" "FileName=#@#Variables.inc" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle3=> Clock Background Color
;ContextAction3=["#@#Addons\RainRGB4.exe" "VarName=ClockBFace" "FileName=#@#Variables.inc"]
ContextAction3=["#@#Addons\RainRGB4.exe" "VarName=ClockBFace" "FileName=#@#Variables.inc" "Alpha=125" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle4=> Clock Color
;ContextAction4=["#@#Addons\RainRGB4.exe" "VarName=ClockFace" "FileName=#@#Variables.inc"]
ContextAction4=["#@#Addons\RainRGB4.exe" "VarName=ClockFace" "FileName=#@#Variables.inc" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle5=> Date Color
;ContextAction5=["#@#Addons\RainRGB4.exe" "VarName=Date" "FileName=#@#Variables.inc"]
ContextAction5=["#@#Addons\RainRGB4.exe" "VarName=Date" "FileName=#@#Variables.inc" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle6=> Current Temp Color
;ContextAction6=["#@#Addons\RainRGB4.exe" "VarName=CurrentTemp" "FileName=#@#Variables.inc"]
ContextAction6=["#@#Addons\RainRGB4.exe" "VarName=CurrentTemp" "FileName=#@#Variables.inc" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle7=> Temp HI/LOW Color
;ContextAction7=["#@#Addons\RainRGB4.exe" "VarName=Temphilow" "FileName=#@#Variables.inc"]
ContextAction7=["#@#Addons\RainRGB4.exe" "VarName=Temphilow" "FileName=#@#Variables.inc" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle8=> Extended Weather
;ContextAction8=["#@#Addons\RainRGB4.exe" "VarName=ExtendedWeather" "FileName=#@#Variables.inc"]
ContextAction8=["#@#Addons\RainRGB4.exe" "VarName=ExtendedWeather" "FileName=#@#Variables.inc" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle9=> Seconds Bar
;ContextAction9=["#@#Addons\RainRGB4.exe" "VarName=SecondsBar" "FileName=#@#Variables.inc"]
ContextAction9=["#@#Addons\RainRGB4.exe" "VarName=SecondsBar" "FileName=#@#Variables.inc" "RefreshConfig=#CURRENTCONFIG#"]

ContextTitle10=Set Imperial Units
ContextAction10=[!WriteKeyValue Variables Language "en-US" "#@#Variables.inc"][!Refresh]
ContextTitle11=Set Metric Units
ContextAction11=[!WriteKeyValue Variables Language "en-GB" "#@#Variables.inc"][!Refresh]

[Variables]
@Include=#@#Variables.inc
@Include1=#@#WeatherComVariables.inc
@Include2=#@#WeatherComRegExp.inc
@Include3=#@#WeatherComCurrent.inc
@Include4=#@#WeatherComForecast.inc
;@Include5=#@#WeatherCom36Hours.inc


[MeasureGotTheData]
Measure=String
String=[@CurrentLocationName]
DynamicVariables=1
IfMatch=^$
IfNotMatchAction=[!HideMeter MeterReticulating][!ShowMeterGroup AllMeters][!Update]

; Overrides a template measure

[NewCurrentTemperatureLow]
Measure=String
Group=Weather
String=[@CurrentTemperatureLow]
DynamicVariables=1
; Note that after some point in the afternoon, there will
; be NO Low Temperature returned. The High Temperature
; returned will then be the "low" from the current time until
; midnight of the same day.
; This can be tested with:
IfMatch=^$
IfMatchAction=[!SetOption MeterTodayHighLow Text "Low Tonight %1%2"]
IfNotMatchAction=[!SetOption MeterTodayHighLow Text "%1%2 | %3%4"]

; Meters

[MeterReticulating]
Meter=String
X=175
Y=75
StringAlign=Center
FontSize=15
FontWeight=600
FontColor=255,255,255,255
SolidColor=0,0,0,1
Padding=5,5,5,5
StringEffect=SHADOW
AntiAlias=1
Text=Updating One Sec ...

[MeterCurrentIcon]
Meter=Image
Group=AllMeters
MeasureName=@CurrentIcon
ImagePath=#@#Weathericons\
X=0
Y=-30
h=225
w=225
StringAlign=left
ImageAlpha=225
PreserveAspectRatio=1
AntiAlias=1
Hidden=1

[MeterLocationCurrent]
MeasureName=@CurrentLocationName
Meter=String
Group=AllMeters
X=25
Y=20
FontFace=Walkway Expand Black
FontColor=#Location#
FontSize=16
FontWeight=400
StringAlign=left
StringStyle=Italic
StringEffect=SHADOW
AntiAlias=1
ClipString=1
Hidden=1

;--------------------------------time
[MeasureTime]
Measure=Time
Format=%I:%M
FontName=Digital
FontName2=DS-Digital

[MeterTimeBack]
MeasureName=MeasureTime
Meter=STRING
Group=AllMeters
X=105
Y=40
FontFace=Digital
FontColor=#ClockBFace#
FontSize=52
StringAlign=left
AntiAlias=1
Text="88:88"
Hidden=1

[MeterTime]
MeasureName=MeasureTime
Meter=STRING
Group=AllMeters
X=r
Y=r
FontFace=Digital
FontColor=#ClockFace#
FontSize=52
StringEffect=SHADOW
StringEffect=BORDER
StringAlign=left
AntiAlias=1
Hidden=1

;----------------------------------date
[MeasureDate]
Measure=Time
Format=%B %d, %A, %Y.

[MeterDate]
MeasureName=MeasureDate
Meter=STRING
Group=AllMeters
X=175
Y=90
FontFace=Walkway Expand Black
FontColor=#Date#
FontSize=16
FontWeight=300
StringEffect=SHADOW
StringAlign=left
AntiAlias=1
Hidden=1

[MeterCurrentTemperature]
Meter=String
Group=AllMeters
MeasureName=@CurrentTemperature
MeasureName2=@CurrentConditions
MeasureName2=@CurrentTemperatureSymbol
MeasureName3=@CurrentTemperatureUnit
X=90r
Y=115
FontFace=Walkway Expand Black
FontColor=#CurrentTemp#
FontSize=14
FontWeight=300
StringAlign=left
StringEffect=SHADOW
AntiAlias=1
Hidden=1
Postfix="°"
Text=%2, %1

Hidden=1

[MeterTodayHighLow]
Meter=String
Group=AllMeters
MeasureName=@CurrentTemperatureHigh
MeasureName2=@CurrentTemperatureHighSymbol
MeasureName3=@CurrentTemperatureLow
MeasureName4=@CurrentTemperatureLowSymbol
X=-170r
Y=5r
StringAlign=left
FontFace=Walkway Expand Black
FontSize=12
FontWeight=300
FontColor=#Temphilow#
StringEffect=SHADOW
AntiAlias=1
Hidden=1

;--------------------------- seconds bar

[MeasureSeconds]
Measure=Time
Format=%S
MaxValue=59

[MeterLine1]
Group=AllMeters
Meter=Image
X=80
Y=140
H=2
W=320
StringAlign=left
SolidColor=68,68,68,200
Hidden=1

[MeterSeconds]
MeasureName=MeasureSeconds
Meter=BAR
Group=AllMeters
X=r
Y=r
H=2
W=320
StringAlign=left
BarColor=#SecondsBar#
SolidColor=255,255,255,225
BarOrientation=HORIZONTAL
Hidden=1

;----------------------------------begin-day2
[@ForecastDay2Icon]
Measure=WebParser
Group=Weather | WeatherEightDay
Url=[@ForecastParent]
StringIndex=8
IfAboveValue=1
IfAboveAction=[!HideMeter MeterDay2IconNA][!ShowMeter MeterDay2Icon]

[MeterDay2Icon]
Path=#@#Weathericons
MeasureName=@ForecastDay2Icon
Group=AllMeters
Meter=Image
PreserveAspectRatio=1
StringAlign=Left
AntiAlias=1
X=95
Y=130
H=75
W=75
Hidden=1

[MeterTempDay2]
MeasureName=@ForecastDay2Name
MeasureName2=@ForecastDay2High
Group=AllMeters
Meter=String
X=80
Y=143
FontFace=bahnschrift
FontColor=#ExtendedWeather#
FontSize=9
FontWeight=300
StringAlign=Left
StringStyle=NORMAL
AntiAlias=1
Text="%1#CRLF#%2"
UpdateDivider=#Rdiv#
Postfix="°"
Hidden=1

;----------------------------------begin-day3
[@ForecastDay3Icon]
Measure=WebParser
Group=Weather | WeatherEightDay
Url=[@ForecastParent]
StringIndex=18
IfAboveValue=1
IfAboveAction=[!HideMeter MeterDay3IconNA][!ShowMeter MeterDay3Icon]

[MeterDay3Icon]
Path=#@#Weathericons
MeasureName=@ForecastDay3Icon
Group=AllMeters
Meter=Image
PreserveAspectRatio=1
AntiAlias=1
X=205
Y=130
H=75
W=75
Hidden=1

[MeterTempDay3]
MeasureName=@ForecastDay3Name
MeasureName2=@ForecastDay3High
Group=AllMeters
Meter=String
X=170
Y=143
FontFace=bahnschrift
FontColor=#ExtendedWeather#
FontSize=9
FontWeight=300
StringAlign=Left
StringStyle=NORMAL
AntiAlias=1
Text="%1#CRLF#%2"
UpdateDivider=#Rdiv#
Postfix="°"
Hidden=1

;----------------------------------begin-day4
[@ForecastDay4Icon]
Measure=WebParser
Group=Weather | WeatherEightDay
Url=[@ForecastParent]
StringIndex=18
IfAboveValue=1
IfAboveAction=[!HideMeter MeterDay4IconNA][!ShowMeter MeterDay4Icon]

[MeterDay4Icon]
Path=#@#Weathericons
MeasureName=@ForecastDay4Icon
Group=AllMeters
Meter=Image
PreserveAspectRatio=1
AntiAlias=1
X=325
Y=130
H=75
W=75
Hidden=1

[MeterTempDay4]
MeasureName=@ForecastDay4Name
MeasureName2=@ForecastDay4High
Group=AllMeters
Meter=String
X=295
Y=143
FontFace=bahnschrift
FontColor=#ExtendedWeather#
FontSize=9
FontWeight=300
StringAlign=Left
StringStyle=NORMAL
AntiAlias=1
Text="%1#CRLF#%2"
UpdateDivider=#Rdiv#
Postfix="°"
Hidden=1
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7026
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

Hackit wrote: March 21st, 2020, 3:31 pm one question i have is, can i have an option in the context menu to adjust the alpha of an image?
i have been reading and came across bangs, not sure if that would produce the transparent(alpha) affect with an image.
I think this could be done with a !SetOption bang modifying the ImageAlpha option of the said image meter, followed by an !Update of the meter and a !Redraw bang.

P.S. The code can be posted using the [code] tags on the forum (the </> button above your post frame).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

ok tnx,
i'll do some reading and see if i can figure this out.
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7026
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

Hackit wrote: March 21st, 2020, 6:02 pm ok tnx,
i'll do some reading and see if i can figure this out.
Yep, forgot one: Context Options (though you seemed to be familiar with it already).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

ok thanks for the links.
because i'm trying to add this to the context menu and have the value stored in variables.
does this warning mean it wont work?
What !SetOption can change and what it can't:
You may only use !SetOption on Meters and Measures. This means that you may not change any settings in [Rainmeter] or [Variables], and may not change a setting in a section used as a MeterStyle, unless that section is ALSO a valid meter or measure type itself.
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7026
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

Hackit wrote: March 21st, 2020, 6:36 pm ok thanks for the links.
because i'm trying to add this to the context menu and have the value stored in variables.
does this warning mean it wont work?
No. It will work. You are not using !SetOption to modify the context menu, but the image meter. The context menu is where you'll use !SetOption from. Something like this, at the beggining of your skin:

Code: Select all

[Rainmeter]
ContextTitle=Modify the image alpha
ContextAction=[!SetOption SomeImageMeter ImageAlpha 128][!UpdateMeter SomeImageMeter][!Redraw][!SetVariable SomeImageAlphaVariable 128]
As far as I know, variables in the context options are always dynamic, so you shouldn't have any paticular issues doing something along the lines of the above. I'm not sure what you mean by having the value stored in variables though:
- if SomeImageAlphaVariable already exists in [Variables], then it will get the value of 128 in the code above
- if you want that variable to be "persistent" (e.g. remain in the [Variables] section after, say, skin unloading or such), then you'd need to take a look at the !WriteKeyValue bang (it's just a !SetOption that writes on the disk instead of in the memory, basically), that writes a Key=Value piece in an .ini or .inc file (that's going to be a little problematic though, as using the value you just written - in this case the image alpha variable - requires that you !Refresh the skin)

Sorry if there are too many links. Just take things easy, one at a time, and you'll eventually get things right. If you still don't after trying, there is always the forum where you can ask for further "guidance". ;-)

EDIT: If you want the value to remain in the [Variables] section even after unloading the skin, and you want to avoid refreshing the skin (and losing other values from the memory in the process), there is a "workaround": just use !SetVariable like above to assign the value to the variable in the memory, and then, when the skin or Rainmeter close, use this in the [Rainmeter] section of your skin:

Code: Select all

OnCloseAction=[!WriteKeyValue Variables SomeImageAlphaVariable 128]
Since the skin (or Rainmeter) will unload/close after the action above, you won't need to use the variable in the "current session" or refresh the skin anymore, but it will be there with the value you want on subsequent skin load or Rainmeter start.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

ok.
by varibles i was refering to where the value is saved. i'll explain the best i can.
here's what i have been trying switching between the actions.

Code: Select all

ContextTitle2=Set Transparency
;ContextAction2=[!WriteKeyValue Variables ImageAlpha "10" "MeterCurrentIcon" "#@#WeatherComVariables.inc"]

ContextAction2=[!SetOption MeterCurrentIcon ImageAlpha "100"][!UpdateMeter][!Redraw]["#@#WeatherComVariables.inc"][!Refresh]
i figured the value needed to be saved in a variables.inc file so i'm testing with WeatherComVariables.inc.

Code: Select all

ImageAlpha=100
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

It's working, so i can now just add a few to have say alpha 15 alpha 175 alpha 200 and alpha 255.
thanks for the help.
i was thinking i could just have a window come up and set any number i want. what i have now is like the transparency built into rainmeter, like 10,20,30 ect.
again thanks
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7026
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

Hackit wrote: March 21st, 2020, 8:30 pmi was thinking i could just have a window come up and set any number i want. what i have now is like the transparency built into rainmeter, like 10,20,30 ect.
Well, you could, if you'd use the InputText plugin (yeah, I know, another link, right?) - just check the sample skin at the bottom and see what's up with it. It's a bit more complicated than what you just did, but not impossible by any means.
Hackit wrote: March 21st, 2020, 8:30 pm It's working, so i can now just add a few to have say alpha 15 alpha 175 alpha 200 and alpha 255.
thanks for the help.
again thanks
You're welcome, but this time it's you who did it. I only provided some directions. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

i love the links, it points me in the right direction with out wondering if the info i'm reading is correct for what i'm trying to do.
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile