Been trying to troubleshoot my attempted usage of "Autorepeat Action"
After I run it the first time, it never runs. What am I missing?
<Macro Name="test">
<Action>EventGhost.AutoRepeat(0.59999999999999998, 0.29999999999999999, 0.01, 3.0)</Action>
<Action>EventGhost.PythonScript(u'print "Test"\n')</Action>
</Macro>
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Autorepeat current macro
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
So, what do you want to archive with AutoRepeat?
AutoRepeat is meant for input that has a "period of time" character. Like pressing and holding a button. It will then repeat the action as long as you press the button.
But if you use it under such a "one-shot" condition, it will not work right, because it simply cannot determine how long you want it to go.
AutoRepeat is meant for input that has a "period of time" character. Like pressing and holding a button. It will then repeat the action as long as you press the button.
But if you use it under such a "one-shot" condition, it will not work right, because it simply cannot determine how long you want it to go.
- Bitmonster
- Site Admin
- Posts: 2239
- Joined: Mon Feb 06, 2006 10:28 pm
Ok, you want timely recurring events. This is not the purpose of the AutoRepeat action. It would block EG all the time anyway.
You can use a script like this:
10.0 means 10 seconds. Edit "MyEvent" to whatever eventname you want.
This will fire this event 10 seconds after the script has executed. So if you put this script at the end of the macro that was triggered by the same event, this will run in a loop every 10 seconds.
You can use a script like this:
Code: Select all
from threading import Timer
t = Timer(10.0, eg.TriggerEvent, ["MyEvent"])
t.start()
This will fire this event 10 seconds after the script has executed. So if you put this script at the end of the macro that was triggered by the same event, this will run in a loop every 10 seconds.
-
hollidayp1
- Posts: 1
- Joined: Sun Oct 01, 2006 7:54 am
Another way to AutoRepeat
I also wanted to autorepeat sending a code every 60 seconds and did it this way:
Macro: Repeat Sending button 1
Usb-Uirt Action: Transmit IR Button 1
eg.action: Wait 60 seconds
eg.action: Jump to "Repeat Sending button 1"
To stop it, disable the macro
Macro: Repeat Sending button 1
Usb-Uirt Action: Transmit IR Button 1
eg.action: Wait 60 seconds
eg.action: Jump to "Repeat Sending button 1"
To stop it, disable the macro