I have been having problems using SKIN:Bang('!SetOption ... Text "..." ') and SKIN:Bang('!SetOption ... ToolTipTitle "..." ') on a STRING Meter since installing 2.3.0 beta r1172 64-bit (Feb 5 2012). The relevant part of the .LUA file is:
function Update()
.....
SKIN:Bang('!SetOption ShowNumActiveStorms Text "Active Storms ( '..iNumStorms..' )\" ')--<< CAUSES ERROR >> --
for i = 1, iNumStorms do
sTitleTipText = sTitleTipText.."- "..tStormName[i].."\n"
SKIN:Bang('!SetOption ShowNumActiveStorms ToolTipText \"'..sTitleTipText..'\"')
SKIN:Bang('!SetOption ShowNumActiveStorms ToolTipTitle "Active Storms" ') --<< CAUSES ERROR >> --
sStormTipText = ""
SKIN:Bang('!SetOption StormMeter'..i..' LeftMouseUpAction """!Execute [http://www.wunderground.com'..tStormLink[i]..']"""')
SKIN:Bang('!SetOption StormMeter'..i..' ImageName ts.png')
SKIN:Bang('!MoveMeter '..(Xpos[i])..' '..(Ypos[i])..' StormMeter'..i..'')
SKIN:Bang('!SetOption StormMeter'..i..' ToolTipTitle \"'..tStormName[i]..'\"')
sStormTipText = "Wind: "..tWind[i].."\n".."Moving: "..tMoving[i]
SKIN:Bang('!SetOption StormMeter'..i..' ToolTipText\"'..sStormTipText..'\"')
end
.....
end -- function Update
Both of the lines marked --<< CAUSES ERROR >> -- result in Error 00:00:03.479 Bang:Config " " not found. All the other SKIN:BANG('!SetOption ...)s, including SKIN:Bang('!SetOption ShowNumActiveStorms ToolTipText \"'..sTitleTipText..'\"')acting on the same String Meter, are fine.
There were no such problems with Rainmeter 2.2.0 r1116 64-bit (Jan 8 2012)
The problem in both cases is the trailing "space" at the end of the bang.
SKIN:Bang('!SetOption ShowNumActiveStorms Text "Active Storms ( '..iNumStorms..' )\" ')
This is telling Rainmeter to send the bang to a Config of "", which of course does not exist. Removing that space:
SKIN:Bang('!SetOption ShowNumActiveStorms Text "Active Storms ( '..iNumStorms..' )\"')
makes it work fine.
However, I did test in 2.2 and while it is and was a syntax error really, Rainmeter 2.2 seems to ignore it and work anyway. We will look into what was changed that is no longer forgiving this error. In the meantime, fix your skin..
jsmorley wrote:The problem in both cases is the trailing "space" at the end of the bang.
That fixed it. Thanks
I get into all sorts of problems trying to get the endings right in the first place without thinking too carefully about the spaces. Guess that means I'm going to have to go back and take a look at my older skins which will probably start churning out the same errors.
I get into all sorts of problems trying to get the endings right in the first place without thinking too carefully about the spaces. Guess that means I'm going to have to go back and take a look at my older skins which will probably start churning out the same errors.
Yeah, getting complicated bangs with embedded values sent from Lua to Rainmeter sometimes feels as much an art as a science...
Here is one of my favorites. Took a while to sort this one out.