It is currently July 4th, 2022, 5:40 am

Make an exe launch on loading of a rainmeter skin?

Get help with creating, editing & fixing problems with skins
ShiestGuy
Posts: 2
Joined: June 11th, 2022, 6:29 pm

Make an exe launch on loading of a rainmeter skin?

Post by ShiestGuy »

I know how to make an exe launch on clicking a text, but is there anyway to make a rainmeter skin launch up exes automatically when you load it up?
User avatar
balala
Rainmeter Sage
Posts: 14338
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Make an exe launch on loading of a rainmeter skin?

Post by balala »

ShiestGuy wrote: June 11th, 2022, 6:34 pm is there anyway to make a rainmeter skin launch up exes automatically when you load it up?
There definitely is. Just have to use a proper OnRefreshAction option in the [Rainmeter] section. For instance the simplest way is this: OnRefreshAction=["d:\Path-Of-Your-Executable.exe"]. Obviously you have to use the appropriate path of the executable.
ShiestGuy
Posts: 2
Joined: June 11th, 2022, 6:29 pm

Re: Make an exe launch on loading of a rainmeter skin?

Post by ShiestGuy »

thank you, thats perfect. however, is there a way i can make it check if the program is open, and then if it isnt, it opens it?
User avatar
balala
Rainmeter Sage
Posts: 14338
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Make an exe launch on loading of a rainmeter skin?

Post by balala »

ShiestGuy wrote: June 12th, 2022, 2:49 am is there a way i can make it check if the program is open, and then if it isnt, it opens it?
Yep, there is. Remove the previously added OnRefreshAction option from the [Rainmeter] section and add the following measure to your code:

Code: Select all

[MeasureProcess]
Measure=Process
ProcessName=Notepad.exe
IfCondition=(#CURRENTSECTION#<0)
IfTrueAction=["Notepad.exe"]
UpdateDivider=-1
Just as an example this measure checks if Notepad.exe does run. If it doesn't, it launches it, otherwise (if Notepad is already running) nothing happens.
Obviously you have to replace the Notepad.exe into the ProcessName option with the appropriate name, but this is the idea.