It is currently April 26th, 2024, 10:14 pm

How to start an command automaticly

Get help with creating, editing & fixing problems with skins
Bryan L
Posts: 2
Joined: August 27th, 2020, 7:42 am

How to start an command automaticly

Post by Bryan L »

Hi i am working on a skin where i would like to run a command automaticly without clicking and have the result displayed,
i cannot figure out how i have to program this any help would be welcome, my current programming:

Code: Select all

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

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=net user "%username%" | find "Username"
State=Hide
OutputType=ANSI
OutputFile=#CURRENTPATH#Username.txt
RegExpSubstitute=1



[MeterRun]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click to Run
LeftMouseUpAction=[!CommandMeasure MeasureRun "Run"]

[MeterResult]
Meter=String
MeasureName=MeasureRun
Y=10R
FontSize=14
FontColor=41,36,33
AntiAlias=1
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to start an command automaticly

Post by jsmorley »

Bryan L wrote: August 27th, 2020, 11:58 am Hi i am working on a skin where i would like to run a command automaticly without clicking and have the result displayed,
i cannot figure out how i have to program this any help would be welcome, my current programming:

Code: Select all

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

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=net user "%username%" | find "Username"
State=Hide
OutputType=ANSI
OutputFile=#CURRENTPATH#Username.txt
RegExpSubstitute=1



[MeterRun]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click to Run
LeftMouseUpAction=[!CommandMeasure MeasureRun "Run"]

[MeterResult]
Meter=String
MeasureName=MeasureRun
Y=10R
FontSize=14
FontColor=41,36,33
AntiAlias=1

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MeasureRun "Run"]
I also think you are going to find it is:

Parameter=net user "%username%" | find "User name"
Bryan L
Posts: 2
Joined: August 27th, 2020, 7:42 am

Re: How to start an command automaticly

Post by Bryan L »

jsmorley wrote: August 27th, 2020, 12:13 pm

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MeasureRun "Run"]
I also think you are going to find it is:

Parameter=net user "%username%" | find "User name"
Thanks for the fast responds it worked
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to start an command automaticly

Post by jsmorley »

Bryan L wrote: August 27th, 2020, 12:45 pm Thanks for the fast responds it worked
You are welcome.