death.crafter wrote: ↑August 13th, 2021, 9:59 pm
Use action timer plugin. You'll find it in docs. If you don't understand something in it come back to ask.
Actually i looked and i wrote code but didnt work. Only one time worked and stopped.
tass_co wrote: ↑August 13th, 2021, 9:45 pm
Hi everyone,
I have a action (open app) and i want to this action repeats with a variable.
How do i?
Besides ActionTimer, you could set Updatedivider=-1 in your calc measure [CalcTekrarsay1] so it is only updated with LeftMouseAction in your button meter.
I modified the IfCondition tests to perform the desired action depending on the value of variable 'TekrarSay1'. If that variable is 2, it will perform the action, wait 2 seconds [!Delay 2000], and perform it again. I also added IfConditionMode=1 so the actions are performed on every update.
I use a Clamp function in your mouse scroll to limit the value of 'TekrarSay1' between 1 and 2. You could expand it to any number and add additional IfCondition tests and actions to the calc measure.
eclectic-tech wrote: ↑August 13th, 2021, 10:38 pm
Besides ActionTimer, you could set Updatedivider=-1 in your calc measure [CalcTekrarsay1] so it is only updated with LeftMouseAction in your button meter.
I modified the IfCondition tests to perform the desired action depending on the value of variable 'TekrarSay1'. If that variable is 2, it will perform the action, wait 2 seconds [!Delay 2000], and perform it again. I also added IfConditionMode=1 so the actions are performed on every update.
I use a Clamp function in your mouse scroll to limit the value of 'TekrarSay1' between 1 and 2. You could expand it to any number and add additional IfCondition tests and actions to the calc measure.
[Variables]
TekrarSay1=1
[CalcTekrarSay1]
Measure=Calc
Formula=#TekrarSay1#
IfCondition=(#TekrarSay1#)=1
IfTrueAction=["#Path1#\EXE\SAVE.mxe"]
IfCondition2=#TekrarSay1#=2
IfTrueAction2=["#Path1#\EXE\SAVE.mxe"][!Delay 2000]["#Path1#\EXE\SAVE.mxe"]
IfConditionMode=1
DynamicVariables=1
UpdateDivider=-1
[Button]
Meter=BUTTON
x=26
y=60
ButtonImage=#image5#
; I want to repeate action but TekrarSay1 times
LeftMouseUpAction=[!UpdateMeasure CalcTekrarSay1]
;["#Path1#\EXE\SAVE.mxe"]
MouseScrollUpAction=[!SetVariable TekrarSay1 "(Clamp(#TekrarSay1#+1,1,2))"]
MouseScrollDownAction=[!SetVariable TekrarSay1 "(Clamp(#TekrarSay1#-1,1,2))"]
MiddleMouseUpAction=[!SetVariable TekrarSay1 "1"]
DynamicVariables=1
Thank you for the editing. But it is not working properly.
When i refresh skin, action works automatically and works only one time.
I use CalcTekrarSay1 for i dont want to #TekrarSay1# 0.
I don't know where i going from here, but i promise it won't be boring...
I don't know what #UU# is so I am keeping it intact. If it is action variable from the action timer example remove it. You don't need it here. But you need to update action timer using updatemeasure if you change the TekrarSay1 or 2.
I don't know what #UU# is so I am keeping it intact. If it is action variable from the action timer example remove it. You don't need it here. But you need to update action timer using updatemeasure if you change the TekrarSay1 or 2.
First of all my english not good. sorry
#UU# a unimportant thing.
This code doesnt work (
I have a image button and string Meter.
When i use mouse on it, i can arrange to action repeat times (TekrarSay1).
and if i click button, i want to repeat action as much that arranged times.
tass_co wrote: ↑August 13th, 2021, 10:53 pm
Thank you for the editing. But it is not working properly.
When i refresh skin, action works automatically and works only one time.
I use CalcTekrarSay1 for i dont want to #TekrarSay1# 0.
What is not working?
You need to be precise in what you want to happen; according to your first code, you wanted to run the exe based on if the variable was 1 or 2 that many times...
The code does that; if you didn't want it to run the first time, set the variable to 0 to start.
Hopefully death.crafter's suggestion is easier for you...
EDIT: I just saw your latest post and will look at that.
Sorry guys. I had a text meter and i forgot to share with you.
ActionTimer codes never worked.
When i disabled this string meter, i realize to codes didnt working
I looked all the examples on the internet and couldn't find such an example.
I guess ActionTimer doesnt work with external files.
I don't know where i going from here, but i promise it won't be boring...