It is currently March 28th, 2024, 1:20 pm

move windows clicking

Get help with creating, editing & fixing problems with skins
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: move windows clicking

Post by JpsCrazy »

As you probably figured out, dynamic variables don't work with .Inc files.
Although messy, long !executes are sometimes necessary. I have some that are 60+ !bangs long.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: move windows clicking

Post by smurfier »

The way an include file works is that the information in that file is pretty much written into the config you want it to be in. That include file is not changed by Rainmeter and if you change a variable value using a bang that change only affects that config. If you want to change a variable value in an include file and have all configs change after that, you will need to use nircmd to change the include file and then use bangs to refresh all the configs that use the include file.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: move windows clicking

Post by jsmorley »

Of course dynamic variables work with .inc files, and it is NOT true that using a bang to change a variable from a .inc file in a running config only effects that config. What?
TestVars.rmskin
(2.48 KiB) Downloaded 90 times
As with most bangs you can specify the name of the config to effect on the end of !RainmeterSetVariable, or use "*" to mean all. There is no reason why a change to a dynamic variable housed in a .inc file can't effect all running skins.

What is true is that any change to a dynamic variable done with !RainmeterSetVariable only survives up to the point any skin using the variable is refreshed, at which point, for that skin, it returns to the original definition of the value, whether in a .inc or in the actual .ini. If you want to PERMANENTLY change a variable, then indeed you will need some addon to literally change the value in the .inc file and then send a !RainmeterRefresh * to tell all skins about the new default value for the variable.

Now it may be true or not that the way the original person with the question is using variables won't work, I have not followed the thread. However, I can't let blanket statements that are just wrong like "dynamic variables don't work with .inc files" or ""if you change a variable value using a bang that change only affects that config" stand without some correction.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: move windows clicking

Post by JpsCrazy »

Either I'm being slow or something, bur the manual says: Note: It's possible to use the variables with the @include but dynamic variables won't work with the @include.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: move windows clicking

Post by jsmorley »

JpsCrazy wrote:Either I'm being slow or something, bur the manual says: Note: It's possible to use the variables with the @include but dynamic variables won't work with the @include.
I believe what that means is that dynamic variables can't be used "as" the @Include.

@Include=#SomeIncludeFile#

and allow changing to a different file dynamically.

So this:

[Variables]
IncFile=..\Text.inc
@Include=#IncFile#

LeftMouseUpAction=!Execute [!RainmeterSetVariable IncFile "..\OtherText.inc" *]

Will not work as far as I know.

I just wanted to be clear that you can certainly define variables in a .inc file and use them, change them dynamically, have the change with !RainmeterSetVariable effect any or all skins at once, etc.
Pechorin
Posts: 11
Joined: June 28th, 2010, 10:46 am

Re: move windows clicking

Post by Pechorin »

nice example :), thanks!

it works as expected, but not as i would like to. the problem is that my skin moves and activates/deactivates configs. if the config is opened, it moves perfectly, but if it has to be opened in a different position, it reads the original value of the file, and not the current value used by the main config. that's logic, but annoying for my case :(

although i have thought another way to do more or less the same, it consists in open every configs at the beggining but with all meters hidden and measures deactivated. so i have a pair of quick questions more...
is there any way to activate/deactivate every config in a folder + subfolders? (when i refresh, i want to close every config previously opened too)
or, is there any way to disable every measure in a config with a single command? and hide all the meters?

i am sorry for so many questions, but i am kinda excited with this tool and making my very first skin :)

thanks everybody for the help!
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: move windows clicking

Post by Alex2539 »

You can't open all of the configs at once. However, once a config is open, you can hide it completely using !RainmeterHide (Config). This won't disable the measures, but it will hide the entire config from view.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: move windows clicking

Post by smurfier »

Of course you can send a bang to all configs. With a bang such as !RainmeterSetVariable one does need to be sure that the variable you're changing exists in only the configs that you wish to change it in. If that variable name is used in another config where dynamic variables are not activated wherever the variable in used, then that config would cease to function correctly. It would be more wise to use a separate bang for each config, stringing them together with the !Execute bang.
Last edited by jsmorley on July 7th, 2010, 7:38 pm, edited 1 time in total.
Reason: Removed untrue statement presented as a fact
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: move windows clicking

Post by Alex2539 »

smurfier wrote:If that variable name is used in another config where dynamic variables are not activated wherever the variable in used, then that config would cease to function correctly.
It's the other way around. If the variable name exists in a config that IS using Dynamic Variables, then it will use the new value whether you want it to or not. If something is reading a variable without DynamicVariables=1 and the variable is changed, it will simply continue using the original value.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: move windows clicking

Post by smurfier »

Forgot about that one.
Post Reply