It is currently April 27th, 2024, 5:00 am
[HELP] Set string value?
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
[HELP] Set string value?
Is there no longer a function to directly set the value of a string meter with Lua?
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Set string value?
Sorry, we are trying to get a head start on some manual changes so we don't have to try to do it all at once tomorrow...smurfier wrote:Is there no longer a function to directly set the value of a string meter with Lua?
You can still use SetText as before, but stay tuned... Only 12 hours more or less until that will be depreciated. You are about to get the entire orchestra, not just one bassoon.
In the meantime, SetText is still here: http://rainmeter.net/cms/LuaScripting
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Set string value?
I'm trying to make a calendar using Lua and it's not working. I'm getting #Extra Operation! in the about dialog.
Code: Select all
PROPERTIES =
{
}
function Initialize()
Meters = {}
for a=1,42 do
Meters[a]=SKIN:GetMeter("mDay"..a)
end
end -- function Initialize
function Update()
Month= os.date("%m")
Year= os.date("%Y")
when = os.time({year=Year, month=Month, day=1})
StartDay = os.date("%w", when)
for a=1,42 do
b = a - StartDay
Meters[a]:SetText(b)
end
return StartDay
end -- function Update
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Set string value?
That error is from the skin, not the Lua, and means there is a problem with a Calc somewhere. Either in a Measure=Calc or in an embedded formula.smurfier wrote:I'm trying to make a calendar using Lua and it's not working. I'm getting #Extra Operation! in the about dialog.
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Set string value?
Alright... I cleaned out all the measures as they were unnecessary and the meters still have no value.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Set string value?
Nothing looks obviously wrong to me in your Lua. Couple of things that I would look at:smurfier wrote:Alright... I cleaned out all the measures as they were unnecessary and the meters still have no value.
Be sure "b" is returning what you think it is. Just put a "print(b)" in there somewhere and look in the log.
Be sure your meters do NOT have DynamicVariables=1 on them. That won't work with SetText().
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Set string value?
It was DynamicVariables.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Set string value?
Won't be a problem in 12 hours... DynamicVariables is about to become about 80% irrelevant.smurfier wrote:It was DynamicVariables.
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Set string value?
Well...I've got it displaying the day numbers correctly and I think I'm going to wait for tomorrows changes before going any further. This really is a whole lot easier with lua.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .