Hey guys,
So new beta phase is starting and this time I don't forget to post this Suggestions:
It would be so nice if we could use variables in a variable.
Example:
#Y_#Config## or ##CurrentSection#Over#
It is currently April 27th, 2024, 1:54 pm
[Suggestions] Variables in a Variable
-
- Posts: 329
- Joined: June 9th, 2011, 6:46 pm
[Suggestions] Variables in a Variable
Rainmeter - You are only limited by your imagination and creativity.
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: [Suggestions] Variables in a Variable
This is not as simple as it appears. :) For instance, should those examples resolve like this?
#Y_#Config##
##CurrentSection#Over#
Or like this?
#Y_#Config##
##CurrentSection#Over#
Without some kind of new syntax, there isn't any good way for Rainmeter to figure out which one you meant.
#Y_#Config##
##CurrentSection#Over#
Or like this?
#Y_#Config##
##CurrentSection#Over#
Without some kind of new syntax, there isn't any good way for Rainmeter to figure out which one you meant.
-
- Posts: 329
- Joined: June 9th, 2011, 6:46 pm
Re: [Suggestions] Variables in a Variable
Yes, I see :)
So maybe with a combination of special characters.
Maybe with brackets:
#(#CurrentSection#)Over# or #(#Config#)Mode(#Mode#)#
#(#var1#)(#(#var2#)(#var3#)#)#
But I think this isn't the best solution ...
So maybe with a combination of special characters.
Maybe with brackets:
#(#CurrentSection#)Over# or #(#Config#)Mode(#Mode#)#
#(#var1#)(#(#var2#)(#var3#)#)#
But I think this isn't the best solution ...
Rainmeter - You are only limited by your imagination and creativity.
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: [Suggestions] Variables in a Variable
Since variable names can have any special characters in them, this won't work either. The problem is that the variables are opened and closed by the exact same character. Not the wisest choice perhaps, but that's what we have now.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Posts: 19
- Joined: November 20th, 2012, 5:12 am
Re: [Suggestions] Variables in a Variable
Forgive my poor English,It sounds a bit like a variable variable,But slightly different,Change your variable name, and the name of the variable is combined into another variable and several characters.AlC wrote:Yes, I see
So maybe with a combination of special characters.
Maybe with brackets:
#(#CurrentSection#)Over# or #(#Config#)Mode(#Mode#)#
#(#var1#)(#(#var2#)(#var3#)#)#
But I think this isn't the best solution ...
This is similar to the variable variables, such as php.
If
$a=b
$$a=c
Then
$b= c
But prescribed the use of variables in rainmeter inside, is surrounded by the '#' symbol, if you want to achieve the effect you say, I think it will change the pattern how we use variables in rainmeter.