It is currently December 6th, 2022, 1:38 pm

Executing Powershell Script when loading Layout

Get help with creating, editing & fixing problems with skins
ScottyB
Posts: 1
Joined: September 25th, 2022, 6:35 pm

Executing Powershell Script when loading Layout

Post by ScottyB »

Would anyone be able to provide some help with the commands needed to execute a powershell script when a new layout is loaded through rainmeter?
User avatar
balala
Rainmeter Sage
Posts: 14766
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Executing Powershell Script when loading Layout

Post by balala »

ScottyB wrote: September 25th, 2022, 6:37 pm Would anyone be able to provide some help with the commands needed to execute a powershell script when a new layout is loaded through rainmeter?
I think you should add an OnRefreshAction option to the [Rainmeter] section of any of the skins belonging to the layout, which executes the script. When the layout is loaded, the skin is loaded and the added OnRefreshAction option is executed, so the script is as well.
However note that the script is executed as well if the skin in cause is loaded / refreshed outside of the layout (which is also possible).