It is currently April 24th, 2024, 2:37 pm
Delay a action
-
- Posts: 36
- Joined: April 13th, 2009, 12:40 am
Delay a action
Hello, I'm not sure if this is possible, but I want to delay a sequence of actions via !execute so they dont happen all at once. Does anybody know how to do that?
-
- Posts: 509
- Joined: April 24th, 2009, 3:17 pm
- Location: Bucharest, Romania Lat 44,43° Lon 26,1°
Re: Delay a action
you could try using a calc formula
[somemeasure]
Measure=Calc
Formula=1
IfEqualValue=1
IfEqualAction=!Execute
[somemeasure]
Measure=Calc
Formula=1
IfEqualValue=1
IfEqualAction=!Execute
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
But I'm good at copy/paste, and I not always like this
-
- Posts: 36
- Joined: April 13th, 2009, 12:40 am
Re: Delay a action
Thanks for the reply, that method didnt work but i found another one:
[somemeasure]
Measure=Calc
Formula=Counter % 100
Substitute=".00000":""
IfEqualValue=1
IfEqualAction=PLAY #CURRENTPATH#piano\12.wav
[somemeasure2]
Measure=Calc
Formula=Counter % 100
Substitute=".00000":""
IfEqualValue=2
IfEqualAction=PLAY #CURRENTPATH#piano\10.wav
[somemeasure3]
Measure=Calc
Formula=Counter % 100
Substitute=".00000":""
IfEqualValue=3
IfEqualAction=PLAY #CURRENTPATH#piano\9.wav
Unfortunately the result wasnt satisfactory so i dropped this idea.
[somemeasure]
Measure=Calc
Formula=Counter % 100
Substitute=".00000":""
IfEqualValue=1
IfEqualAction=PLAY #CURRENTPATH#piano\12.wav
[somemeasure2]
Measure=Calc
Formula=Counter % 100
Substitute=".00000":""
IfEqualValue=2
IfEqualAction=PLAY #CURRENTPATH#piano\10.wav
[somemeasure3]
Measure=Calc
Formula=Counter % 100
Substitute=".00000":""
IfEqualValue=3
IfEqualAction=PLAY #CURRENTPATH#piano\9.wav
Unfortunately the result wasnt satisfactory so i dropped this idea.
-
- Developer
- Posts: 263
- Joined: July 31st, 2009, 2:23 pm
- Location: Tokyo, JPN
Re: Delay a action
If started "Counter", it cannot be reset until being restarted skin, and "Counter" will not start from 0 even if the skin is refreshed. This means this command is effective only the first once. And it would not be possible to use that repeatedly.
So I think that the feature of this "Counter" is not suitable for the solution of this request.
Now, the following examples count up without using "Counter". But basic approach is similar to yours. I suggest this solution.
_____________________________________
EDIT:
If your request is just to execute some actions continuously at intervals of one second, the following relay method is easier.
So I think that the feature of this "Counter" is not suitable for the solution of this request.
Now, the following examples count up without using "Counter". But basic approach is similar to yours. I suggest this solution.
Code: Select all
[MeasureDelay_5Sec]
Measure=Calc
Formula=MeasureDelay_5Sec + 1
IfEqualValue=5
IfEqualAction=!Execute [notepad][!RainmeterDisableMeasure MeasureDelay_5Sec]
Disabled=1
[MeasureDelay_10Sec]
Measure=Calc
Formula=MeasureDelay_10Sec + 1
IfEqualValue=10
IfEqualAction=!Execute [cmd][!RainmeterDisableMeasure MeasureDelay_10Sec]
Disabled=1
[MeasureDelay_15Sec]
Measure=Calc
Formula=MeasureDelay_15Sec + 1
IfEqualValue=15
IfEqualAction=!Execute [calc][!RainmeterDisableMeasure MeasureDelay_15Sec]
Disabled=1
[MeterAction]
Meter=STRING
W=100
H=20
FontSize=12
SolidColor=FFFFFF
Text=Action!
LeftMouseDownAction=!Execute [!RainmeterEnableMeasure MeasureDelay_5Sec][!RainmeterEnableMeasure MeasureDelay_10Sec][!RainmeterEnableMeasure MeasureDelay_15Sec]
EDIT:
If your request is just to execute some actions continuously at intervals of one second, the following relay method is easier.
Code: Select all
[MeasureDelay1]
Measure=Calc
Formula=1
IfEqualValue=1
IfEqualAction=!Execute [notepad][!RainmeterEnableMeasure MeasureDelay2][!RainmeterDisableMeasure MeasureDelay1]
Disabled=1
[MeasureDelay2]
Measure=Calc
Formula=1
IfEqualValue=1
IfEqualAction=!Execute [cmd][!RainmeterEnableMeasure MeasureDelay3][!RainmeterDisableMeasure MeasureDelay2]
Disabled=1
[MeasureDelay3]
Measure=Calc
Formula=1
IfEqualValue=1
IfEqualAction=!Execute [calc][!RainmeterDisableMeasure MeasureDelay3]
Disabled=1
[MeterAction]
Meter=STRING
W=100
H=20
FontSize=12
SolidColor=FFFFFF
Text=Action!
LeftMouseDownAction=!Execute [!RainmeterEnableMeasure MeasureDelay1]