Quantcast
Viewing all articles
Browse latest Browse all 704

Help: Rainmeter Skins • Re: Controlling wallpaper engine

Can someone give me a code for opening and closing an application on a single icon. Since wallpaper engine takes up vram I'd like to toggle it on and off on a click before opening my games.
Unfortunately more or less this is a skin request, which is not allowed, however I'm gonna give you a tip.
To can not just open, but close as well an app, you need for first a variable, which controls the state of the app. Let's name it State and create it in the [Variables] section. Add it: State=0. I'm gonna control the state of Notepad by this, but obviously you can use it for another app as well.
Opening an app is quite simple, but closing it is a little bit more complicated. To close it you need a RunCommand plugin measure. Add it:

Code:

[MeasureClose]Measure=PluginPlugin=RunCommandParameter=taskkill /im notepad.exeState=Hide
If you want to use this to close another program, you have to replace the notepad.exe parameter of the above Parameter option by the appropriate name.
You need another Calc measure which will control the state of the app. This measure will run the program when the value of the previously introduced State variable is 1 (or above - but it never will be above) and will close when it's 0 or below. So, add this measure:

Code:

[MeasureState]Measure=CalcFormula=#State#IfCondition=(#CURRENTSECTION#=0)IfTrueAction=[!CommandMeasure "MeasureClose" "Run"]IfFalseAction=["notepad.exe"]DynamicVariables=1
Note that it's operating by the value of the State variable.
Finally you need a mouse action which will open and close the associated app. Add it to any meter you want to use to open and close the app: LeftMouseUpAction=[!SetVariable State "(1-#State#)"][!UpdateMeasure "MeasureState"][!UpdateMeter "#CURRENTSECTION#"]

Statistics: Posted by balala — Yesterday, 10:06 am



Viewing all articles
Browse latest Browse all 704

Trending Articles