IDontKnow wrote:then is it possible to use a .inc file for the variables, and set the url as a variable, then use the .lua to change the .inc text, and refresh the skin? That way, when the skin refreshes, it isn't resetting the url variable back to what it was, it's loading the modified document. Is that possible? and if so, how could I do that?
Yes, and you don't really need to use a .inc file, you can write directly to the skin .ini file if you want.
!WriteKeyValue [Section] [Key] [Value] ("FileSpec")
So something like:
!WriteKeyValue WebParserMeasureName URL "
http://somesite.com" #CURRENTPATH##CURRENTFILE#
http://rainmeter.net/cms/Bangs
In Lua, you would need to get the values for #CURRENTPATH# and #CURRENTFILE# and #CURRENTCONFIG# in the Initialize() section with calls like:
sCurrentPath = SKIN:GetVariable('CURRENTPATH')
sCurrentFile = SKIN:GetVariable('CURRENTFILE')
sCurrentConfig = SKIN:GetVariable('CURRENTCONFIG')
Then in your Update() section get and set as a variable whatever the URL is you want to change.
sURLToSet = "
http://SomeSite.com"
Then use the bang like:
SKIN:Bang('!WriteKeyValue WebParserMeasureName URL '..sURLToSet..' '..sCurrentPath..sCurrentFile)
SKIN:Bang('!Refresh '..sCurrentConfig)
The one caveat here is that you MUST be sure to do all this in a way that does not cause an endless loop of setting the URL and refreshing the skin. You can't have the skin when loaded or refreshed automatically get some values and run this script, then have the script set a value and refresh, if that is just going to cause the process to repeat endlessly.