Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 988

Help: Rainmeter Skins • Re: Help with getting HueShift based on Process Uptime instead of System Uptime

$
0
0
Instead, I would like to base HueStart based on the uptime that Explorer.EXE has been running, especially since Lively crashes anyways if you restart Explorer.
I'm gonna skip the skin you mentioned or the hue shift method you use since you already got that covered. Forget about asking ChatGPT, it can't compare to a human and the whole AI thing is mostly hype, it's more or less Cortana enhanced at this point (and for a long time afterwards). Now, on the how-to approach, you don't necessarily need PowerShell for this (PS commands can be used with the help of a RunCommand measure, by the way):
- Process measure: https://docs.rainmeter.net/manual/measures/process/
- IfConditions options in a measure: https://docs.rainmeter.net/manual/measures/general-options/ifconditions/
- Time measure: https://docs.rainmeter.net/manual/measures/time/
- SysInfo measure: https://docs.rainmeter.net/manual/measures/sysinfo/
- RunCommand plugin: https://docs.rainmeter.net/manual/plugins/runcommand/
In basic, general terms, assuming your skin always runs while the computer is on, you'd:
- check if the Explorer process is running in an IfCondition added to your Process measure
- if so (by default this would mean Explorer just started), set a variable to the "now" timestamp of a Time measure, to have the start time stored in that variable
- use another Time measure for the current "now" time
- based on the timestamp difference between your 2nd Time measure and the 1st (which you can compute in a Calc measure), do your hue shift process as usual

Let us know if you need further assistance with the implementation. I suggest starting from scratch with this in a simple skin and use the notepad.exe process instead, until you get the idea and make things work as desired. After that, you can switch to explorer.exe easily.

EDIT: A basic sample computing the number of seconds while notepad.exe is running, with 0 otherwise (in the end, a single Time measure was needed):

Code:

[Variables]StartTimestamp=0ElapsedSeconds=0[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1BackgroundMode=2SolidColor=0,0,0,255---Measures---[MeasureTime]Measure=TimeFormat=%a, %Y-%b-%d, %H:%M:%SOnUpdateAction=[!SetVariable ElapsedSeconds (#StartTimestamp#=0?0:[MeasureTime:Timestamp]-#StartTimestamp#)]DynamicVariables=1[MeasureProcess]Measure=ProcessProcessName=Notepad.exeIfCondition=(MeasureProcess=1)IfTrueAction=[!SetVariable StartTimestamp [MeasureTime:Timestamp]][!UpdateMeasure *][!UpdateMeter *][!Redraw]IfFalseAction=[!SetVariable StartTimestamp 0][!UpdateMeasure *][!UpdateMeter *][!Redraw]DynamicVariables=1---Meters---[Result]Meter=StringFontFace=ConsolasFontSize=14FontColor=255,255,255,255AntiAlias=1Text=Current Time      = [MeasureTime]#CRLF#Start   Timestamp = #StartTimestamp##CRLF#Current Timestamp = [MeasureTime:Timestamp]#CRLF#Elapsed Seconds   = #ElapsedSeconds#DynamicVariables=1

Statistics: Posted by Yincognito — Yesterday, 5:42 pm



Viewing all articles
Browse latest Browse all 988

Trending Articles