It is currently March 29th, 2024, 10:52 am

Command line to change text/imagename

Get help with creating, editing & fixing problems with skins
User avatar
Dreossk
Posts: 18
Joined: November 12th, 2015, 7:21 pm

Command line to change text/imagename

Post by Dreossk »

Hello,

I'm trying to use the command line feature to change text or image in a meter in a skin. Is it possible? I tried playing with SetOption but it doesn't specify the config name so I guess it's why I can't get it to work.

Thanks!
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Command line to change text/imagename

Post by jsmorley »

Yes, you would need to include the config name as the final parameter on !SetOption used in a bang from the command line.
User avatar
Dreossk
Posts: 18
Joined: November 12th, 2015, 7:21 pm

Re: Command line to change text/imagename

Post by Dreossk »

So this?

Code: Select all

Rainmeter.exe !SetOption MeterX ImageName "#@#\image.jpg" "ConfigName"

Code: Select all

Rainmeter.exe !SetOption MeterY Text "Hello" "ConfigName"
I can't get it to work :/
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Command line to change text/imagename

Post by jsmorley »

Dreossk wrote:So this?
Rainmeter.exe !SetOption MeterX ImageName "image.jpg" "ConfigName"

I can't get it to work :/
Then you are getting "ConfigName" wrong.

Code: Select all

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

[MeterOne]
Meter=String
InlineSetting=Size | 11
InlineSetting2=Weight | 400
InlineSetting3=Color | 255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=One Two Three
1.jpg
1) Rainmeter.exe is not in your Windows PATH, and must be fully specified. Since "Program Files" has a space in it, the fully qualified executable must be enclosed in quotes.

2) The command to Rainmeter is !SetOption. Everything else after that is a parameter for !SetOption, so never enclose the entire thing in quotes like:

"C:\Program Files\Rainmeter\Rainmeter.exe" "!SetOption SomeMeter SomeOption SomeValue"

As that won't work.

3) Use quotes around any distinct parameters that have spaces in them like the "Four Five Six" in my example.
You do not have the required permissions to view the files attached to this post.
User avatar
Dreossk
Posts: 18
Joined: November 12th, 2015, 7:21 pm

Re: Command line to change text/imagename

Post by Dreossk »

I restarted Rainmeter and it works now. Thanks!

:confused:
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Command line to change text/imagename

Post by jsmorley »

Dreossk wrote:I restarted Rainmeter and it works now. Thanks!
I resist that... Rainmeter will by default send any "orphan" commands that don't have a proper "ConfigName" on them to the last config loaded by Rainmeter, you need to test that it is really working as expected. I can't see how restarting Rainmeter would make any difference at all OTHER than what it sees as the last config loaded...
User avatar
Dreossk
Posts: 18
Joined: November 12th, 2015, 7:21 pm

Re: Command line to change text/imagename

Post by Dreossk »

I had another test command to Hide/Show that same skin and it was working with that copy-pasted ConfigName so I don't know what was wrong.