Page 1 of 2
LuaWind
Posted: December 29th, 2010, 6:07 pm
by jsmorley
This is another example of how you might use Mattking's fabulous new Lua Measure=Script feature of the latest Rainmeter 1.4 beta.
This will obtain the current wind direction in compass degrees from Yahoo Weather, and turn it into some useful information.
First get the latest beta (at least r676) from
http://Rainmeter.net.
Then install this skin:
LuaWind.rmskin
12-29-2010 1-00-46 PM.png
Re: LuaWind
Posted: December 29th, 2010, 9:52 pm
by sgtevmckay
Tried to install.
Rainmeter Crashed with the following information:
I can pull down information from the mention files if necessary
Restart of Rainmeter; the skin works like a champ.
Too bad we are unable to get the image to rotate to reflect the wind direction
Re: LuaWind
Posted: December 29th, 2010, 10:11 pm
by jsmorley
sgtevmckay wrote:Tried to install.
Rainmeter Crashed with the following information:
I can pull down information from the mention files if necessary
Restart of Rainmeter; the skin works like a champ.
Too bad we are unable to get the image to rotate to reflect the wind direction
Actually, that would be really simple. Just use your image, set dynamicvariables=1 and set ImageRotate=[WindDirection] Just so happens that degrees of a compass and of the full rotation of an image are 0 to 360, so no clever calculating needs to be done.
Re: LuaWind
Posted: December 29th, 2010, 10:20 pm
by sgtevmckay
jsmorley wrote:Actually, that would be really simple. Just use your image, set dynamicvariables=1 and set ImageRotate=[WindDirection] Just so happens that degrees of a compass and of the full rotation of an image are 0 to 360, so no clever calculating needs to be done.
Just need to separate the Center sun Icon from the Compass ring
I am going to work on that.
Great Graphics find
Re: LuaWind
Posted: December 29th, 2010, 10:23 pm
by jsmorley
sgtevmckay wrote:
Just need to separate the Center sun Icon from the Compass ring
I am going to work on that.
Great Graphics find
Yeah, and have one of the "beams" highlighted so it becomes a "pointer" and start it pointing north. Then just set ImageRotate and you have it.
Re: LuaWind
Posted: December 29th, 2010, 10:25 pm
by jsmorley
Or put the pointer in the middle like this:
Re: LuaWind
Posted: December 29th, 2010, 11:45 pm
by jsmorley
Fixed a small typo in the .lua file. New version in the first post.
Re: LuaWind
Posted: May 3rd, 2011, 2:11 pm
by TheAslan
I don't understand how you managed to get that Northwest text in your skin, i checked the code but there wasn't any measurements for that? Or did i missed something?
Re: LuaWind
Posted: May 3rd, 2011, 2:19 pm
by jsmorley
TheAslan wrote:I don't understand how you managed to get that Northwest text in your skin, i checked the code but there wasn't any measurements for that? Or did i missed something?
Most of that work is done in the .lua file, not the skin .ini.
It's a simple two dimensional lookup table that uses the wind direction in degrees returned by the skin to look up the appropriate full direction text and abbreviation (North by Northwest / NbNW). The Lua script then simply sets the values of the meters displaying this information.
Re: LuaWind
Posted: May 3rd, 2011, 3:43 pm
by TheAslan
So what i have to write in .ini file to get it show?