Yeah, we know.TheIrishFrenchman wrote:yeah, that's the one. It's so widely used I assumed everyone would know what I'm talking about.
A first solution would be the following one: open in your thext editor the dinaj.lua file within the DINAJ2 config. Locate the Update() function and modify it as you see below::
Code: Select all
function Update()
-- get current temp
local temp = tonumber(Handles.Temperature_Measure:GetStringValue())
-- WebParser will not have returned values for the first few update ticks
if temp ~= nil then
setMeterText(Handles.Main_Meter, getMainString(temp))
setMeterText(Handles.Sub_Meter, getSubString(temp, Settings.Unit))
if getMainString(temp) == 'You need a jacket' then
SKIN:Bang('!ActivateConfig', 'Rain', 'Rain.ini')
else
SKIN:Bang('!DeactivateConfig', 'Rain')
end
end
end
The disadvantage of this approach is that the rain will be activated only when the main skin returns the "You need a jacket" string. For any other returned string, the Rain won't be activated. I'm not sure what else the main skin, through the dinaj.lua can return, I didn't investigat it, but if in the future you find any other string which should activate the rain, please come back and let me (us) know, to can modify again the Update() function accordingly.