It is currently October 21st, 2021, 6:33 am

Skin Load/Unload Via Bat File

Get help with installing and using Rainmeter.
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Load/Unload Via Bat File

Post by jsmorley »

MourningStar wrote: August 14th, 2021, 6:19 pm C:\Users\MourningStar\Documents\Rainmeter\Skins\Gadgets\Weather Meter

C:\Users\MourningStar\Documents\Rainmeter\Skins\Gadgets\Weather Meter\Weather Meter.ini
Go to About / Version from the context menu of Rainmeter

Click the "Copy to clipboard" button and paste that here...
Rainmeter 4.4.0.3508 beta (64-bit)
Language: English (1033)
Build time: 2021-07-27 14:51:31
Windows 10 Pro 2009 64-bit (build 22000) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\JSMorley\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\JSMorley\AppData\Roaming\Rainmeter\
IniFile: C:\Users\JSMorley\AppData\Roaming\Rainmeter\Rainmeter.ini
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

jsmorley wrote: August 14th, 2021, 6:22 pm Go to About / Version from the context menu of Rainmeter

Click the "Copy to clipboard" button and paste that here...
Rainmeter 4.4.0.3508 beta (64-bit)
Language: English (1033)
Build time: 2021-07-27 14:51:31
Windows 10 Home 2009 64-bit (build 19043) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\MourningStar\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\MourningStar\AppData\Roaming\Rainmeter\
IniFile: C:\Users\MourningStar\AppData\Roaming\Rainmeter\Rainmeter.ini
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Load/Unload Via Bat File

Post by jsmorley »

MourningStar wrote: August 14th, 2021, 6:25 pm Rainmeter 4.4.0.3508 beta (64-bit)
Language: English (1033)
Build time: 2021-07-27 14:51:31
Windows 10 Home 2009 64-bit (build 19043) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\MourningStar\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\MourningStar\AppData\Roaming\Rainmeter\
IniFile: C:\Users\MourningStar\AppData\Roaming\Rainmeter\Rainmeter.ini
Yep. Looks right...

I promise, that this MUST work:

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gadgets\Weather Meter" "Weather Meter.ini"

This assumes of course that Rainmeter is already running. The !ActivateConfig bang cannot be used as a part of "starting" Rainmeter. ALL "bangs" to Rainmeter.exe, except !LoadLayout, must be used while Rainmeter is running, or the entire command is just ignored. If you are trying to "start" Rainmeter, while forcing it to do something as soon as it starts, you can't do that, other than loading a saved Layout.

https://docs.rainmeter.net/manual-beta/bangs/#LoadLayout
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

jsmorley wrote: August 14th, 2021, 6:27 pm This assumes of course that Rainmeter is already running. ...
It is, as stated in the first sentence of post#1.

thx for your help
User avatar
jsmorley
Developer
Posts: 22372
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Skin Load/Unload Via Bat File

Post by jsmorley »

MourningStar wrote: August 14th, 2021, 6:51 pm It is, as stated in the first sentence of post#1.

thx for your help
Sure. Sorry, but I'm out of ideas.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1616
Joined: March 23rd, 2015, 5:26 pm

Re: Skin Load/Unload Via Bat File

Post by SilverAzide »

MourningStar wrote: August 14th, 2021, 6:51 pm It is, as stated in the first sentence of post#1.

thx for your help
For your testing, instead of !ActivateConfig try !ToggleConfig to see if it does anything. Is your command-line reporting any errors, or is it just returning without doing anything? Otherwise, I'm fresh out of ideas too. What jsmorley and I posted definitely work.
Gadgets Wiki GitHub More Gadgets...
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

SilverAzide wrote: August 14th, 2021, 7:01 pm For your testing, instead of !ActivateConfig try !ToggleConfig ...
Image

(refer to last sentence of post#5)
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

Thx everyone for the help thus far.

The 'Toggleconfig' does indeed cause the specified skins to show and hide. However, I believe the command lines as suggested do not allow for variants, as it is requiring the skin's configname (i.e the exact name of the inc). I fear to imagine what adding multiple lines with every variant will result in. Also, if a skin happens to be unloaded at the time the internet Off is executed that skin will load and vice-versa. Not 'precisely' as the op is requesting. If the op faulted in clarity my apologies.

(perhaps if the 'ActivateConfig' parameter worked for me the op would be resolved?)

thoughts
User avatar
SilverAzide
Rainmeter Sage
Posts: 1616
Joined: March 23rd, 2015, 5:26 pm

Re: Skin Load/Unload Via Bat File

Post by SilverAzide »

MourningStar wrote: August 14th, 2021, 9:49 pm Thx everyone for the help thus far.

The 'Toggleconfig' does indeed cause the specified skins to show and hide. However, I believe the command lines as suggested do not allow for variants, as it is requiring the skin's configname (i.e the exact name of the inc). I fear to imagine what adding multiple lines with every variant will result in. Also, if a skin happens to be unloaded at the time the internet Off is executed that skin will load and vice-versa. Not 'precisely' as the op is requesting. If the op faulted in clarity my apologies.

(perhaps if the 'ActivateConfig' parameter worked for me the op would be resolved?)

thoughts
This is odd. !ActivateConfig only "activates" if the skin is not loaded. If it is already loaded, it does nothing. So it should have worked assuming the skin was unloaded when you tried it. The last parameter of the command line is what you need to activate variants. So, for example:

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gadgets\Wireless Meter" "Wireless Meter.ini"
"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gadgets\Wireless Meter" "Wireless Meter Pro.ini"

!ToggleConfig has the same parameters as !ActivateConfig, but will toggle whichever variant needs toggling (you can't activate two of the same variants at the same time).
Gadgets Wiki GitHub More Gadgets...
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: Skin Load/Unload Via Bat File

Post by MourningStar »

SilverAzide wrote: August 14th, 2021, 10:07 pm This is odd. !ActivateConfig only "activates" if the skin is not loaded. If it is already loaded, it does nothing. So it should have worked assuming the skin was unloaded when you tried it.
Ah, correct - that is why nothing happened. Now it work as per these 'conditions'.
SilverAzide wrote: August 14th, 2021, 10:07 pmThe last parameter of the command line is what you need to activate variants. So, for example:

"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gadgets\Wireless Meter" "Wireless Meter.ini"
"C:\Program Files\Rainmeter\Rainmeter.exe" !ActivateConfig "Gadgets\Wireless Meter" "Wireless Meter Pro.ini"

!ToggleConfig has the same parameters as !ActivateConfig, but will toggle whichever variant needs toggling (you can't activate two of the same variants).
Understood - i.e. the variants are 'locked' into this process because of the required 'configname' parameter.

still, not what I'm after. Looking to 'load'/'unload' the specific skin (and the variant on display at the time).

So, not possible to do what I need? If I am not clear perhaps I can re-word the op.