This is some damn-clever thinking outside the box...balala wrote: ↑May 14th, 2019, 7:08 pm Probably there is not, but you can use the Clamp function to limit the value. For example if you're using a !SetVariable bang to set the entered value to a variable (Command1=[!SetVariable MyVariable "$UserInput$"]), you can limit this value as it follows: Command1=[!SetVariable MyVariable "(Clamp($UserInput$,0,10))"] (obviously you have to edit the limits of the above Clamp function to whatever you do need).
It is currently October 14th, 2024, 11:40 pm
Working with InputText
-
- Developer
- Posts: 22856
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Working with InputText
-
- Posts: 442
- Joined: July 30th, 2014, 10:30 am
Re: Working with InputText
...and it is still not my "best" shot.
-
- Posts: 442
- Joined: July 30th, 2014, 10:30 am
Re: Working with InputText
i guess there is a better way to simplify the refreshes of the multiple skins in skin suite as in this case:
LeftMouseUpAction=[!WriteKeyValue "Variables" "SkinColor1Alpha" "180" "#@#\Variables.inc"][!Refresh][!Refresh "illustro_Pulsar_HWi\CPU-RAM"][!Refresh "illustro_Pulsar_HWi\VolumeControl"]
Command2=[!Refresh][!Refresh #ROOTCONFIG#\CPU-RAM][!Refresh #ROOTCONFIG#\VolumeControl]
LeftMouseUpAction=["#@#Addons\RainRGB4.exe" "VarName=SkinColor2" "FileName=#@#\Variables.inc" "RefreshConfig=illustro_Pulsar_HWi\CPU-RAM | illustro_Pulsar_HWi\VolumeControl | illustro_Pulsar_HWi\Settings"]
Pls let me know if yes.
@jsmorley sorry if this one is one more from the inside of my small box . Don't expect a tree of a mustard seed.
LeftMouseUpAction=[!WriteKeyValue "Variables" "SkinColor1Alpha" "180" "#@#\Variables.inc"][!Refresh][!Refresh "illustro_Pulsar_HWi\CPU-RAM"][!Refresh "illustro_Pulsar_HWi\VolumeControl"]
Command2=[!Refresh][!Refresh #ROOTCONFIG#\CPU-RAM][!Refresh #ROOTCONFIG#\VolumeControl]
LeftMouseUpAction=["#@#Addons\RainRGB4.exe" "VarName=SkinColor2" "FileName=#@#\Variables.inc" "RefreshConfig=illustro_Pulsar_HWi\CPU-RAM | illustro_Pulsar_HWi\VolumeControl | illustro_Pulsar_HWi\Settings"]
Pls let me know if yes.
@jsmorley sorry if this one is one more from the inside of my small box . Don't expect a tree of a mustard seed.
-
- Developer
- Posts: 22856
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Working with InputText
You can add a Group option to the [Rainmeter] section of each of the skins, or alternatively add a Group option to the [ConfigName] section for each skin in Rainmeter.ini, and then use !RefreshGroup.
-
- Posts: 442
- Joined: July 30th, 2014, 10:30 am
Re: Working with InputText
i was overlooked that even the skins can be grouped, apart from meters and measures.
Last edited by pul53dr1v3r on May 16th, 2019, 2:24 pm, edited 1 time in total.
-
- Developer
- Posts: 22856
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Working with InputText
The difference between defining them in the [Rainmeter] section of the skin .ini file, and defining them in the [ConfigName] section in Rainmter.ini is that if it is in Rainmeter.ini, then it is based on the config name, and if you have more than one skin variant that shares that config name, they automatically all get the group attribute. If you define it in the skin .ini, then only that variant will be a member of the group. Having said that though, you also need to consider if you have multiple Layouts that contain your skins, as if you want this attribute to be available in any Layout, you would need to add it to the [ConfigName] option in each, where doing it in the skin .ini makes it specific to the skin / variant and nothing else would ever need to be done.
If you are going to be sharing your skins, and want this Group functionality to be a part of things for users who get your skins, I'd be tempted to put the Group option in the skin .ini file, as you have little or no control over how people manage their Layouts.
So which way you go is up to you, depending on how you intend to use the Group functionality.
If you are going to be sharing your skins, and want this Group functionality to be a part of things for users who get your skins, I'd be tempted to put the Group option in the skin .ini file, as you have little or no control over how people manage their Layouts.
So which way you go is up to you, depending on how you intend to use the Group functionality.
-
- Posts: 442
- Joined: July 30th, 2014, 10:30 am
Re: Working with InputText
i put it in the skins as a group because it will be widely shared and that way it does the job well. It also looks like a more familiar option to me. Firstly i wanted to cut short writing all the skin names in every refresh function. It would also be bringing a headache if one would change a skin's name etc.
Thanks for the thorough explanation of that!
-
- Rainmeter Sage
- Posts: 5540
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Working with InputText
Just wanted to add the approach I have been using which groups all skins I create, and for any suite of skins, to a unique group.
I add the a line by default to the [Rainmeter] whenever I start to create a new skin.
Becaue #RootConfig# is a unique name, using Group=#RootConfig# will add the current skin to a group of skins with the name of the Root Skin Folder where the skin is located.
This has several benefits, the main one being able to control every skin in your suite of skins specifically when you need to refresh all of them, but do not want to refresh every skin an end user has loaded, the way !RefreshApp would do.
Also, if the end user wants to change the Root Skin folder name, all of the skins will still be associated with that "new skin folder name" group.
Hopefully others may find this a useful technique.
I add the a line by default to the [Rainmeter] whenever I start to create a new skin.
Code: Select all
[Rainmeter]
Group=#RootConfig#
...
This has several benefits, the main one being able to control every skin in your suite of skins specifically when you need to refresh all of them, but do not want to refresh every skin an end user has loaded, the way !RefreshApp would do.
Also, if the end user wants to change the Root Skin folder name, all of the skins will still be associated with that "new skin folder name" group.
Hopefully others may find this a useful technique.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 16658
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Working with InputText
For sure. This is a damn good idea. Thanks for sharing it. Definitely will use it.
-
- Posts: 442
- Joined: July 30th, 2014, 10:30 am