It is currently March 28th, 2024, 8:46 am

bangs won't work with cmd

Get help with creating, editing & fixing problems with skins
Post Reply
RainmeterGuy09
Posts: 4
Joined: June 26th, 2019, 9:09 am

bangs won't work with cmd

Post by RainmeterGuy09 »

howdy.
I've been trying to use the rainmeter bangs in command prompt to launch a skin. it only worked the first time then it just stopped working for some reason after closing rainmeter.
this is the code I use:
cd C:\Program Files\Rainmeter
"C:\Program Files\Rainmeter\rainmeter.exe" !ShowFade "illustro\Clock'

why did this only work once? is there a way to fix it or any way around it? like to launch a skin but indirectly?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: bangs won't work with cmd

Post by jsmorley »

RainmeterGuy09 wrote: June 26th, 2019, 9:21 am howdy.
I've been trying to use the rainmeter bangs in command prompt to launch a skin. it only worked the first time then it just stopped working for some reason after closing rainmeter.
this is the code I use:
cd C:\Program Files\Rainmeter
"C:\Program Files\Rainmeter\rainmeter.exe" !ShowFade "illustro\Clock'

why did this only work once? is there a way to fix it or any way around it? like to launch a skin but indirectly?
Looks to me like you have mismatched "quotes' on the config name. Also, I don't see any need for the cd command.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: bangs won't work with cmd

Post by jsmorley »

This seems to work for me:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program="C:\Program Files\Rainmeter\rainmeter.exe"
Parameter=!ToggleFade "illustro\Clock"

[MeterImage]
Meter=Image
W=50
H=50
SolidColor=255,255,255,255
LeftMouseUpAction=[!CommandMeasure MeasureRun "Run"]
Or from the command line:
1.png


The !ToggleFade and !ShowFade/!HideFade bangs assume the config is already running of course.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: bangs won't work with cmd

Post by balala »

RainmeterGuy09 wrote: June 26th, 2019, 9:21 am cd C:\Program Files\Rainmeter
"C:\Program Files\Rainmeter\rainmeter.exe" !ShowFade "illustro\Clock'

why did this only work once? is there a way to fix it or any way around it? like to launch a skin but indirectly?
Note that the purpose of the !ShowFade bangs isn't to "launch" (load) a skin, but to show up a hidden skin. The skin which you want to show MUST be loaded (in this case the skin belonging to the illustro\Clock config). If the skin isn't loaded, the !ShowFade bang doesn't work, no matter if you use it into a skin, or in command line.
So, beside jsmorley's reply, is the skin in cause loaded and hidden?
RainmeterGuy09
Posts: 4
Joined: June 26th, 2019, 9:09 am

Re: bangs won't work with cmd

Post by RainmeterGuy09 »

they're working now. but only after I launch the skin in rainmeter at first.
it was working fine when I just used the command to launch a skin without opening rainmeter and loading the skin. then it just stopped.
for example: to load the illustro clock, I have to load the skin in radiometer first. only then I can use the toggle fade command and the rest of the bangs. if I don't load it first in rainmeter it just doesn't work. thought it was working at first. anyway to fix this?
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: bangs won't work with cmd

Post by balala »

RainmeterGuy09 wrote: June 27th, 2019, 6:13 am they're working now. but only after I launch the skin in rainmeter at first.
As I earlier said, the !ShowFade bang does exactly this: it shows an already loaded and hidden skin. Doesn't load an unloaded skin.
RainmeterGuy09 wrote: June 27th, 2019, 6:13 am for example: to load the illustro clock, I have to load the skin in radiometer first. only then I can use the toggle fade command and the rest of the bangs. if I don't load it first in rainmeter it just doesn't work. thought it was working at first. anyway to fix this?
There is nothing to fix: a skin HAS TO BE LOADED, in order to apply a bang to it. Bangs can't be applied on unloaded skin. They can instead on hidden ones, but this another story. On unloaded skins you simply can't apply bangs.

And just to clarify some terms: please take care that the program is called Rainmeter, not Radiometer.
RainmeterGuy09
Posts: 4
Joined: June 26th, 2019, 9:09 am

Re: bangs won't work with cmd

Post by RainmeterGuy09 »

it was working though at first, then it stopped.is there any other way to load a skin without loading it first?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: bangs won't work with cmd

Post by jsmorley »

User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: bangs won't work with cmd

Post by balala »

RainmeterGuy09 wrote: June 27th, 2019, 10:36 am is there any other way to load a skin without loading it first?
"load a skin without loading it"?
Let's clarify a few notion. There is a great difference between loading and showing a skin. I think you're mixing these notions.
To use any skin, you have to load it first. If not loaded, the skin isn't executed. When installing a skin, in many cases after installation, the installer loads the skin in question, but this isn't absolutely necessary. If the skin isn't loaded by the installer or if you're talking about a previously installed skin, you necessary have to load it in order to use it / get it working. As said, an unloaded skin doesn't run, you don't see it on the screen and can't get it to work. Loading of a skin can be done either manually, or with the !ActivateConfig bang (see jsmorley's previously posted link).
After loading a skin on the other hand, you can hide it (for instance with a !Hide, !HideFade, !Toggle or !TogglaFade bang). In a such case, the skin is still running in background, but you can't see it on the screen, it being hidden. The measures are executed exactly like the skin would be visible. A such skin can be shown using any of the !Show / !ShowFade / !Toggle / !ToggleFade bangs.
RainmeterGuy09
Posts: 4
Joined: June 26th, 2019, 9:09 am

Re: bangs won't work with cmd

Post by RainmeterGuy09 »

Thanks lads. The ActivateConfig command worked great! Cheers!
Post Reply