It is currently April 26th, 2024, 11:06 pm

Idle_Time doesn't restart

Get help with creating, editing & fixing problems with skins
d3ward
Posts: 4
Joined: August 24th, 2018, 1:33 pm

Idle_Time doesn't restart

Post by d3ward »

Hello , i'm working on a new skin and i can't make this conditions work .

Inside MySkin i have 2 measures, the AudioLevel and the Idle_Time

The first condition check if the audio is 0 and the idle time is over the default value then i show "MySkin"

The second condition is to hide "MySkin" if the AudioLevel is > 0 or if the idle_time is below the "value"

The problem is that if the audio change from any to 0 and the idle time is > #value# the "MySkin" will show because of first condition.

I need to restart the idle_time and !EnableMeasure doesn't work .

How i can restart that Idle_Time ? Thanks

Here important part of the code as reference :

Code: Select all

[DetectAudio]
    Measure=Plugin
    Plugin=AudioLevel
    Port=Output
    UpdateDivider=10
[DetectIdle]
    Measure=Plugin
    Plugin=SysInfo
    SysInfoType=IDLE_TIME
    UpdateDivider=10
    IfCondition=(DetectIdle>#value# && ([DetectAudio] = 0)) 
    IfTrueAction=[!ShowFade "MySkin"][!SetVariable "moveL" "1"]
    IfCondition2=[DetectAudio] > 0 || (DetectIdle<#value# ) 
    IfTrueAction2=[!HideFade "MySkin"][!SetVariable "moveL" "0"][!EnableMeasure DetectIdle]
    DynamicVariables=1
  
Edit: Added the DetectAudio Measure
Last edited by d3ward on February 20th, 2020, 4:58 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Idle_Time doesn't restart

Post by balala »

d3ward wrote: February 20th, 2020, 4:35 pm How i can restart that Idle_Time ?
Moving the mouse or hitting any key on keyboard.
d3ward wrote: February 20th, 2020, 4:35 pm Here important part of the code as reference :
Important yes, but not enough. [DetectAudio] would also be needed. Please post it as well.
d3ward
Posts: 4
Joined: August 24th, 2018, 1:33 pm

Re: Idle_Time doesn't restart

Post by d3ward »

balala wrote: February 20th, 2020, 4:55 pm Moving the mouse or hitting any key on keyboard.
Let me give more info about the "skin" , im trying to emulate a screensaver.
So let's imagine im wathcing a video and the second condition will be true ( audio >0 and the idle_time will go above #value# ) . Once the video finish then the audio will be =0 and the first condition will be triggered. These Conditions will be checked once every 100ms and trigger a key or move the mouse 1 px , i think is a bad idea .

Ps. Thanks for the quick reply and i added the DetectAudio measure
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Idle_Time doesn't restart

Post by balala »

d3ward wrote: February 20th, 2020, 5:18 pm Let me give more info about the "skin" , im trying to emulate a screensaver.
So let's imagine im wathcing a video and the second condition will be true ( audio >0 and the idle_time will go above #value# ) . Once the video finish then the audio will be =0 and the first condition will be triggered. These Conditions will be checked once every 100ms and trigger a key or move the mouse 1 px , i think is a bad idea .

Ps. Thanks for the quick reply and i added the DetectAudio measure
OK, is there a question now? Because I'm not quite sure.
d3ward
Posts: 4
Joined: August 24th, 2018, 1:33 pm

Re: Idle_Time doesn't restart

Post by d3ward »

balala wrote: February 20th, 2020, 6:20 pm OK, is there a question now? Because I'm not quite sure.
Yes , the question is the same of the post. How i can restart the Idle_Time ?
I tried with the UpdateMeasure and EnableMeasure , it doesn't work .
My request is if there is a way to reset the Idle_Time when Condition2 is true
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Idle_Time doesn't restart

Post by balala »

d3ward wrote: February 20th, 2020, 7:01 pm Yes , the question is the same of the post. How i can restart the Idle_Time ?
I tried with the UpdateMeasure and EnableMeasure , it doesn't work .
My request is if there is a way to reset the Idle_Time when Condition2 is true
The question doesn't make too much sense in my opinion. Idle_Time ([DetectIdle] measure in fact) can be restarted by moving the mouse or hiting a key on keyboard. There is no other way to reset it.