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.

Running a specific macro @ a specific time (7:00 PM)

If you have a question or need help, this is the place to be.
Post Reply
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Running a specific macro @ a specific time (7:00 PM)

Post by stisev »

Hi all,
I searched the forum, but coudn't find an answer.
What I want to is a little more complicated than it looks.

There is a bug in my favorite (free) antivirus Antivir which forces me to turn to EventGhost for a solution and run a program on my own.

Basically, I need to run a file "D:\Applications\Avira\AntiVir PersonalEdition Premium\preupd.exe" every day or so to update my antivirus.

I wanted to use "Main.OnInit" then Wait 12 hours (in seconds), but Wait:.... doesn't let you do more than 999 seconds. :(
User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Running a specific macro @ a specific time (7:00 PM)

Post by topix »

With the Timer plugin you can generate an event with a timer which starts at a given time. Is this what you are looking for?
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Running a specific macro @ a specific time (7:00 PM)

Post by stisev »

Yes, the timer would work.

I tried to get it to work, but I tried and it didn't work. Can someone tell me if I'm doing something wrong?

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1449">
    <Folder Name="Antivirus Update">
        <Macro Name="Antivir Update">
            <Event Name="Main.OnInit" />
            <Action>
                Timer.TimerAction(u'Antivir Update', 0, 0, 10.0, u'Antivir', False, False, 2, u'06:35:00')
            </Action>
            <Action>
                System.Execute(u'D:\\Applications\\Avira\\AntiVir PersonalEdition Premium\\preupd.exe', u'/DM="2"', 3, True, 1, u'')
            </Action>
        </Macro>
    </Folder>
</EventGhost>
User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Running a specific macro @ a specific time (7:00 PM)

Post by topix »

You have to execute the timer once, not unlimited.
Put this in your EG-Autostart-Folder:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1449">
    <Action>
        Timer.TimerAction(u'Antivir Update', 0, 1, 0.01, u'Antivir', False, False, 2, u'06:35:01')
    </Action>
</EventGhost>
and this somewhere in your configuration-tree:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1449">
    <Macro Name="Antivir Update">
        <Event Name="Timer.Antivir" />
        <Action>
            Timer.TimerAction(u'Antivir Update', 4, 1, 1.0, u'', False, True, 1, u'00:00:00')
        </Action>
        <Action>
            System.Execute(u'D:\\Applications\\Avira\\AntiVir PersonalEdition Premium\\preupd.exe', u'/DM="2"', 3, True, 1, u'')
        </Action>
        <Action>
            Timer.TimerAction(u'Antivir Update', 1, 1, 1.0, u'', False, True, 1, u'00:00:00')
        </Action>
    </Macro>
</EventGhost>
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Running a specific macro @ a specific time (7:00 PM)

Post by stisev »

It worked perfectly. Thanks! Now antivir's update scheduler runs @ 8 PM exactly. This is an even better solution to running antivir's schedule.exe 24/7!
Post Reply