It is currently March 29th, 2024, 1:18 pm

The RunCommand

Get help with creating, editing & fixing problems with skins
DougC822
Posts: 6
Joined: July 19th, 2017, 9:29 pm

The RunCommand

Post by DougC822 »

I have installed rainMeter and used the RunCommand in my first skin which is to read the version of a piece of code. The command line would be "pip list --format=legacy | findstr mycode". Using the mouse actions it works as designed. The problem is I need the skin to work automatically no mouse clicks. Any ideas?
Thanks in advance
DougC
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: The RunCommand

Post by balala »

DougC822 wrote:The command line would be "pip list --format=legacy | findstr mycode". Using the mouse actions it works as designed. The problem is I need the skin to work automatically no mouse clicks. Any ideas?
Add the same command to the OnRefreshAction option of the [Rainmeter] section.
Last edited by balala on July 20th, 2017, 6:46 pm, edited 1 time in total.
DougC822
Posts: 6
Joined: July 19th, 2017, 9:29 pm

Re: The RunCommand

Post by DougC822 »

Added the line to rainMeter section and set the "State=Show'". The cmd window opened I could see the data go by, but no data output to file or screen. Watching the screen it looked like the command was not passed in correctly. In the command I have a "|" pipe filter, so that when you run the command from a "cmd" window the only data seen should be the data you are looking for. I could see the whole list go by.

Tried various quotes and square braces around the but no change

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

Re: The RunCommand

Post by balala »

DougC822 wrote:Added the line to rainMeter section and set the "State=Show'". The cmd window opened I could see the data go by, but no data output to file or screen. Watching the screen it looked like the command was not passed in correctly. In the command I have a "|" pipe filter, so that when you run the command from a "cmd" window the only data seen should be the data you are looking for. I could see the whole list go by.
Sorry, my fault, I wasn't quite careful.
In the OnRefreshAction you have to add the option to run the RunCommand plugin measure. Something like OnRefreshAction=[!CommandMeasure "MeasureRun" "Run"], where if needed, you have to replace the MeasureRun name with the appropriate name of the RunCommand plugin.
Sorry again...
DougC822
Posts: 6
Joined: July 19th, 2017, 9:29 pm

Re: The RunCommand

Post by DougC822 »

Brilliant worked like a charm
Thanks again

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

Re: The RunCommand

Post by balala »

DougC822 wrote:Brilliant worked like a charm
I'm glad. Sorry again for my inattention...
DougC822
Posts: 6
Joined: July 19th, 2017, 9:29 pm

Re: The RunCommand

Post by DougC822 »

No worries
DougC