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.

Autorepeat current macro

If you have a question or need help, this is the place to be.
Post Reply
openbox
Posts: 19
Joined: Wed Jun 21, 2006 4:10 pm

Autorepeat current macro

Post by openbox »

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>
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Which version and which input plugin are you using?
AutoRepeat should be the last action in the macro, as it will jump at the AutoRepeat to the beginning of the macro. So everything after it will only be executed a single time after you release the event.
openbox
Posts: 19
Joined: Wed Jun 21, 2006 4:10 pm

Post by openbox »

Using EG 0.3.2.611.

Using /EventGhost/Auto Repeat Current Macro

I've also tried the auto repeat action placed last in the macro but no dice.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

611 was a version with "ButtonReleased" event. Do you see this event?
(The newest version doesn't have this event anymore, but instead show through the tray-icon how long the event is standing.)

Do you use the X10 plugin is input?
openbox
Posts: 19
Joined: Wed Jun 21, 2006 4:10 pm

Post by openbox »

No I don't have the ButtonReleased event.
My tray-icon does switch between red and green.
I am not using the X10 plugin as input. I'm just trying to have a macro use OSD to momentarily show current time, every few minutes or so.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

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.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

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:

Code: Select all

from threading import Timer
t = Timer(10.0, eg.TriggerEvent, ["MyEvent"])
t.start()
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.
hollidayp1
Posts: 1
Joined: Sun Oct 01, 2006 7:54 am

Another way to AutoRepeat

Post by hollidayp1 »

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
Post Reply