Jump to content
Macro Express Forums

Reset Schedule


hurricane51

Recommended Posts

Is the problem simply that the timing is poor?

 

1. It's out by a few seconds each time (see Time Interval in Options/Preferences/Activations 10sec default)

2. It runs every 90 minutes but at an odd time say 10.02 (when setting activation, set calculating next runtime to the next hour exactly or whatever is required).

3. The 90 minutes starts from when the macro finishes running. That would be a problem. It's always seemed strange that one thing you cannot do is set the schedule time with a variable. Then you could correct any timing errors or reschedule macros based on other events (ie dynamic macro).

Link to comment
Share on other sites

Is the problem simply that the timing is poor?

 

1. It's out by a few seconds each time (see Time Interval in Options/Preferences/Activations 10sec default)

2. It runs every 90 minutes but at an odd time say 10.02 (when setting activation, set calculating next runtime to the next hour exactly or whatever is required).

3. The 90 minutes starts from when the macro finishes running. That would be a problem. It's always seemed strange that one thing you cannot do is set the schedule time with a variable. Then you could correct any timing errors or reschedule macros based on other events (ie dynamic macro).

No, I have a 5-minute window when it can run. What I want to do is "zero-out" the counter. So what you are saying is that if I manually "Run Macro Now" it will reset the counter to 0 and start from there?

Link to comment
Share on other sites

I was looking at MEPro's settings which has a settable start time. To start at a particular point in an hour in ME3 you would have to start at that point.

 

If the macro is enabled, you would set the time interval before the exact start time and hit OK before time. A save dialog appears which you hit at the exact time.

 

If the macro is disabled and then enabled at the exact time, the 90mins will run from there. This is a more convenient method.

 

I did not find the timer very accurate for short test times - the 5secs was often closer to 10 but that may vary from PC to PC. The lateness seemed to get worse over time on a 5min schedule. You will have to run tests to see how accurate yours are. If you don't want to hang around or want to monitor long-term, have the macro write the time to a text file every time it runs (start of macro).

 

Perhaps the Windows Scheduled Tasks may be better. If ME's schedule starts when the macro finishes running then the Scheduled Task method would be more accurate. I can't spend time right now looking at other solutions to reset time. Hopefully someone else will.

Link to comment
Share on other sites

I'm currently running some timer tests in the background.

 

Here's a crude method that is as accurate as the PC clock + ME activation delay. I have a hotkey macro for ME Explorer for setting Schedule Activations. I select the Scheduled macro to be set in the listing. Run the setting macro with the hotkey. It goes through the steps via Properties that you would take to do it manually. Once the macro gets to the dialog I set the schedule time manually. You could write a macro that is called to run at the end of your main macro. It would:

 

Calculate next run time. If last schedule was 10am, calculate next time as 11.30am

Note: 12am, 12pm transitions have to be handled with logic. If hour = 13, put hour = 1, toggle AM/PM

Bring ME Explorer to the front

Select your main macro in the list (may need some logic to do that)

Run through to the Set Schedule, Daily* dialog

Set the new Schedule time

Close dialogs

*Daily is easiest with every day selected because you don't have to bother about setting date. Once Daily is selected for a given macro, next run through, Daily will be remembered (or it could be the last used - check).

 

I don't know of a neater method. For this sort of thing that may occur during normal activities I would precede the ME Explorer appearance by 5 audio dings at 1 sec intervals with a 5sec delay after that before the macro acts (to allow user to get hands off). If your main macro gives sufficient visual warning an audio notification may be unnecessary.

 

(Edit) I ran an ME3 macro that consisted of a 60sec timer, scheduled to run every 10mins. Each time it ran it wrote the time to a text file. The schedule was losing about a second an hour. That's not huge but the macro was the only activity on the PC.

 

(Edit2) I ran the same ME3 macro using another software timer. The time loss was about 1/2 that for ME Scheduled repeat. The software timer was direct timing 10mins, not on a schedule.

 

Another method that will remove long-term drift to the accuracy of the PC clock involves adding some code to the main macro:

Set schedule to 90mins but start it about 1min early (by enabling macro for the first time at say 9.59am)

When macro runs 1 minute early -

Macro starts Repeat and puts time into hr:min:sec variable every second

Count number of repeats

When time equals or exceeds desired local PC time (calculated per my previous post)

Continue with rest of main macro

If repeat count < 10, >90 give alarm

Schedule has drifted to within 10secs or 90secs away from desired time

(but is still actually running on time - new start required)

 

Needless to say, for most purposes regular scheduled repeat timing is fine!

Edited by JohnS
Link to comment
Share on other sites

I'm currently running some timer tests in the background.

 

Here's a crude method that is as accurate as the PC clock + ME activation delay. I have a hotkey macro for ME Explorer for setting Schedule Activations. I select the Scheduled macro to be set in the listing. Run the setting macro with the hotkey. It goes through the steps via Properties that you would take to do it manually. Once the macro gets to the dialog I set the schedule time manually. You could write a macro that is called to run at the end of your main macro. It would:

 

Calculate next run time. If last schedule was 10am, calculate next time as 11.30am

Note: 12am, 12pm transitions have to be handled with logic. If hour = 13, put hour = 1, toggle AM/PM

Bring ME Explorer to the front

Select your main macro in the list (may need some logic to do that)

Run through to the Set Schedule, Daily* dialog

Set the new Schedule time

Close dialogs

*Daily is easiest with every day selected because you don't have to bother about setting date. Once Daily is selected for a given macro, next run through, Daily will be remembered (or it could be the last used - check).

 

I don't know of a neater method. For this sort of thing that may occur during normal activities I would precede the ME Explorer appearance by 5 audio dings at 1 sec intervals with a 5sec delay after that before the macro acts (to allow user to get hands off). If your main macro gives sufficient visual warning an audio notification may be unnecessary.

 

(Edit) I ran an ME3 macro that consisted of a 60sec timer, scheduled to run every 10mins. Each time it ran it wrote the time to a text file. The schedule was losing about a second an hour. That's not huge but the macro was the only activity on the PC.

 

(Edit2) I ran the same ME3 macro using another software timer. The time loss was about 1/2 that for ME Scheduled repeat. The software timer was direct timing 10mins, not on a schedule.

 

Another method that will remove long-term drift to the accuracy of the PC clock involves adding some code to the main macro:

Set schedule to 90mins but start it about 1min early (by enabling macro for the first time at say 9.59am)

When macro runs 1 minute early -

Macro starts Repeat and puts time into hr:min:sec variable every second

Count number of repeats

When time equals or exceeds desired local PC time (calculated per my previous post)

Continue with rest of main macro

If repeat count < 10, >90 give alarm

Schedule has drifted to within 10secs or 90secs away from desired time

(but is still actually running on time - new start required)

 

Needless to say, for most purposes regular scheduled repeat timing is fine!

My problem is really much simpler than that.

 

I have a simple macro that clicks in a very large "live" area that pops up every 90 minutes. That's all it does. I could be off by 100 pixels in any direction and would still be withing bounds of the active area.

 

I would be happy if it worked as few as 6 times in a row. I have a time window of 5 minutes.

 

The message pops up and waits for the single mouse click. It nevers comes. If I use "Run Macro Now", it macro runs and closes the pop up just like it's supposed to. But it never works on the schedule.

 

I really don't have any way to test if this macro is not obeying the schedule or there is some other issue. I originally thought that I needed to zero out the start time, but if that's the case neither "Run Macro Now" nor Enabling the macro and then manually running it sets it up for the scheduled activation in 90 minutes.

Link to comment
Share on other sites

.....I really don't have any way to test if this macro is not obeying the schedule or there is some other issue. I originally thought that I needed to zero out the start time, but if that's the case neither "Run Macro Now" nor Enabling the macro and then manually running it sets it up for the scheduled activation in 90 minutes.

 

The first step is that every time the macro runs, get it to append the current time to a text file. That way you can tell how the timing is drifting. That allows the most basic adjustment - if it's losing 20 secs between activations, reduce the schedule cycle time by 20 seconds. That will keep it running much longer even if your PC is responding poorly.

 

Your window is 5 minutes every 90 minutes and you are only getting 6 successes in a row. That sounds like a lot of drift. If the schedule is slipping back (which was always the case in my timing tests) then you should start the macro running at the start of the 5 minute window. It will have to drift 5 minutes for the macro not to work. If you set it near the end it will quickly drift into lateness.

 

My second suggestion of adding code to the main macro to count down the time worked perfectly and would activate within a second of the PC clock time indefinitely (the res of ME's timing setting and readout). The main problem was that it was awkward to set going and that for some reason the count down caused the timing to drift. On 10 minute cycle I got about 18 successes before it drifted to the alarm point. On a faster PC it may never drift. I did not get further than the prototype.

 

(edit) You should also observe what is going on every 90 mins for an extended period to see if other things are happening. That would include the active area moving or changing shape, pop-ups interfering. You could also consider doing multiple clicks spaced out time-wise and location-wise. Also seeing if there is some way to tell the click has been effective (to initiate other click patterns if necessary).

Edited by JohnS
Link to comment
Share on other sites

The first step is that every time the macro runs, get it to append the current time to a text file. That way you can tell how the timing is drifting. That allows the most basic adjustment - if it's losing 20 secs between activations, reduce the schedule cycle time by 20 seconds. That will keep it running much longer even if your PC is responding poorly.

 

Your window is 5 minutes every 90 minutes and you are only getting 6 successes in a row. That sounds like a lot of drift. If the schedule is slipping back (which was always the case in my timing tests) then you should start the macro running at the start of the 5 minute window. It will have to drift 5 minutes for the macro not to work. If you set it near the end it will quickly drift into lateness.

 

My second suggestion of adding code to the main macro to count down the time worked perfectly and would activate within a second of the PC clock time indefinitely (the res of ME's timing setting and readout). The main problem was that it was awkward to set going and that for some reason the count down caused the timing to drift. On 10 minute cycle I got about 18 successes before it drifted to the alarm point. On a faster PC it may never drift. I did not get further than the prototype.

 

(edit) You should also observe what is going on every 90 mins for an extended period to see if other things are happening. That would include the active area moving or changing shape, pop-ups interfering. You could also consider doing multiple clicks spaced out time-wise and location-wise. Also seeing if there is some way to tell the click has been effective (to initiate other click patterns if necessary).

No, you misunderstood. I would be HAPPY if I got 6 in a row. The macro NEVER RUNS ON A SCHEDULE.

So I don't think it has anything to do with drift. I just need a way to ensure that it starts 90 minutes from when I run it manually, or enable it, or both. It's not running on the schedule. It runs fine when I run it manually.

 

It doesn't have any dependencies, it's simply designed to click the mouse button in a specified area every 90 minutes or so. The popup never moves and it is quite large in area. The popup always comes to the top of all the other windows. The mouse pointer could be off by 100 pixels in any direction and it would still work. I've sat and watched it and it simply doesn't activate. It ALWAYS works when I run it manually.

Link to comment
Share on other sites

I thought I'd ask about all the other things too.

 

By running manually that would be by right-click and Run now? That mode of operation should show it basically works but bypasses interlocks such as Scope. It WILL run although not necessarily activate the pop-up. The macro will not run if other macros are running. That is universal however you try and start a 2nd macro. Manual mouse click is not valid as a test in case the pop-up has protection against automatic clicking ie manual click always works.

 

Have you checked the Scope? The macro will not run at scheduled time if it's the wrong window name or whatever Scope you used. You can set your scheduled time to say 20 secs. Set the Scope Global and see if it clicks every 20secs on empty Notepad. Then see if it runs with the window, still on Global Scope.

 

If that works set your desired Scope and test. If it's a browser (you have not said for sure what it is but sounds like it), use a partial title in case the page name changes from day-to-day. It's also possible the page name changes as the pop-up appears.

 

You are checking "Play macro indefinitely" in Set Schedule/Other dialog? No other macros running? No other activities running? Is the pop-up associated with any software on your PC - makes it easier for author to install anti-autoclicking protection?

 

That's all I can think of for now.

Link to comment
Share on other sites

I thought I'd ask about all the other things too.

 

By running manually that would be by right-click and Run now? That mode of operation should show it basically works but bypasses interlocks such as Scope. It WILL run although not necessarily activate the pop-up. The macro will not run if other macros are running. That is universal however you try and start a 2nd macro. Manual mouse click is not valid as a test in case the pop-up has protection against automatic clicking ie manual click always works.

 

Have you checked the Scope? The macro will not run at scheduled time if it's the wrong window name or whatever Scope you used. You can set your scheduled time to say 20 secs. Set the Scope Global and see if it clicks every 20secs on empty Notepad. Then see if it runs with the window, still on Global Scope.

 

If that works set your desired Scope and test. If it's a browser (you have not said for sure what it is but sounds like it), use a partial title in case the page name changes from day-to-day. It's also possible the page name changes as the pop-up appears.

 

You are checking "Play macro indefinitely" in Set Schedule/Other dialog? No other macros running? No other activities running? Is the pop-up associated with any software on your PC - makes it easier for author to install anti-autoclicking protection?

 

That's all I can think of for now.

Thanks for the reply. I wasn't aware of the bypass when running the macro manually.

 

I have other macros that load with this file, but they are all manually activated. I assume that means they are not running?

 

The Scope seems to be right. You're right about the program. What happens is I'm running Sirius, which starts a player inside an Internet Explorer window. Macros Express identifies this as a valid program, so that's set as the program the macro runs within. The name does not change, But I'll shorten it to SIRIUS and see if that has an effect.

 

I do have "Play macro indefinitely" checked, and it has always been checked. The pop-up applies only to the player. As a comment, this is a stupid policy of Sirius to check every 90 minutes so its users "don't clog the Internet" (believe it or not, that's what one service tech said).

 

The pop-up always comes to the front of other windows, but in any case I have arranged most of the other program windows so that they don't obscure the part of the window I am recording (the artist/title section).

 

Oh, one more thing. Did you ever establish at what point the macro begins its countdown the 90-second point? Your comments seem to cast doubt over the use of running the macro manually. Would enabling the macro from a disabled state be the triggering action necessary?

 

Thanks again.

 

David

Link to comment
Share on other sites

...I have other macros that load with this file, but they are all manually activated. I assume that means they are not running?

I'm not sure what you mean there. If you have macros that have Activation as "None", they will still run if called to run by another macro. If the first macro does not run neither will the called macros.

I do have "Play macro indefinitely" checked, and it has always been checked. The pop-up applies only to the player

It sounds as though Sirius should do the trick but when you set the Scope, are you sure you got the pop-up/player and not the browser window (that should be clear in the list of open windows when you set Scope)? Until you get it working with Global Scope, it's not worth bothering about more specific Scope or anything else.

Did you ever establish at what point the macro begins its countdown the 90-second point? Your comments seem to cast doubt over the use of running the macro manually. Would enabling the macro from a disabled state be the triggering action necessary?

Enabling the macro from disabled works fine for getting the timing right - the scheduled time starts from there. That method is more flexible than using the schedule setting. Remember that the first activation does not immediately happen, it is when the first time period ends. In MEPro you can actually set the first start time.

 

It does not sound as though you've tried the 20sec tests I mentioned. That would help a lot in determining where the problem lies. Something else that may help is to Activate the window and add small time delays before your Mouse Move and Mouse Left Click to ensure the commands are ready as the macro starts. I would also add an audible (Set Sound) after the mouse click so you are sure the macro ran - delete after testing.

Link to comment
Share on other sites

  • 2 weeks later...
I'm not sure what you mean there. If you have macros that have Activation as "None", they will still run if called to run by another macro. If the first macro does not run neither will the called macros.

 

It sounds as though Sirius should do the trick but when you set the Scope, are you sure you got the pop-up/player and not the browser window (that should be clear in the list of open windows when you set Scope)? Until you get it working with Global Scope, it's not worth bothering about more specific Scope or anything else.

 

Enabling the macro from disabled works fine for getting the timing right - the scheduled time starts from there. That method is more flexible than using the schedule setting. Remember that the first activation does not immediately happen, it is when the first time period ends. In MEPro you can actually set the first start time.

 

It does not sound as though you've tried the 20sec tests I mentioned. That would help a lot in determining where the problem lies. Something else that may help is to Activate the window and add small time delays before your Mouse Move and Mouse Left Click to ensure the commands are ready as the macro starts. I would also add an audible (Set Sound) after the mouse click so you are sure the macro ran - delete after testing.

Hi John,

 

I haven't responded because I think this is all moot now. I have had a continuing problem with Sirius' service, to the point where they can fix it and so I cancelled the service. Up 'til then I really never solved the macro activation, although I think it was centered around the Scope, as you pointed out.

 

Regardless, thanks for your help. I'll probably use this in future macros.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...