It is currently April 16th, 2024, 7:08 pm

ActionTImer speed issue: too fast: Wait 500 -----[Solved]

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ActionTImer speed issue: too fast: Wait 500 -----

Post by jsmorley »

To "Repeat" the action in my example many times, you might do:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
IAmHidden=0

[MeasureBlinkIt]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Blink, 200, 10
Blink=[!SetVariable IAmHidden "(1-#IAmHidden#)"][!UpdateMeasure MeasureBlinkIt][!UpdateMeter MeterString][!Redraw]
DynamicVariables=1

[MeterString]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Hidden=#IAmHidden#
DynamicVariables=1
Text=Hello World

[MeterBlink]
Meter=String
Y=30
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Blink it
LeftMouseUpAction=[!CommandMeasure MeasureBlinkIt "Execute 1"]
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: ActionTImer speed issue: too fast: Wait 500 -----

Post by Mor3bane »

Suddenly, this is going really well 8-)

Thanks jsmorley, for the clarifications :thumbup:
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ActionTImer speed issue: too fast: Wait 500 -----

Post by jsmorley »

Or an even BETTER way, if you use the latest Rainmeter 4.1 beta at https://www.rainmeter.net

Skin:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Lua]
Measure=Script
ScriptFile=Test.lua
Disabled=1

[MeasureBlinkIt]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat Blink, 200, 10
Blink=[!CommandMeasure Lua "ToggleHidden()"][!UpdateMeter MeterString][!Redraw]
DynamicVariables=1

[MeterString]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Hidden=[&Lua:amHidden]
DynamicVariables=1
Text=Hello World

[MeterBlink]
Meter=String
Y=30
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Blink it
LeftMouseUpAction=[!CommandMeasure MeasureBlinkIt "Execute 1"]
Test.lua:

Code: Select all

amHidden=0

function ToggleHidden()

	amHidden = (1 - amHidden)
	
end
https://docs.rainmeter.net/manual-beta/lua-scripting/inline-lua/

I LOVE this new Inline Lua! :-)
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: ActionTImer speed issue: too fast: Wait 500 -----

Post by Mor3bane »

Even better indeed - I just have to learn Lua... :oops:
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ActionTImer speed issue: too fast: Wait 500 -----

Post by jsmorley »

Mor3bane wrote:Even better indeed - I just have to learn Lua... :oops:
Well, good place to start... It is uhm. 4 lines of Lua. ;-)

Anyway, glad you are making progress. Have fun.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: ActionTImer speed issue: too fast: Wait 500 -----

Post by Mor3bane »

I can see the structure is vaguely similar to C++, given you did the traditional indentation etc.

I just need to learn the syntax that seems to be based on adjectives and conjunctional phrasing - but my exposure to the Lua universe is quite terran in nature.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.