Jump to content
Macro Express Forums

Scheduled Macro Question


Recommended Posts

Ok, for a change of pace, I thought I'd ask about a functionality rather than complaining about a problem.

 

Situation: When I go to lunch, I often return to my desk early start fiddling around, maybe even start working if I'm really motivated or bored, and have a tendency to forget to log back in.

 

To help prevent taking a "long lunch" when I was actually back early, I had a very handy ME3 macro that was scheduled to run every 30 minutes. The macro would remain disabled until I logged out for lunch (an action which, by design, would enable the "Reminder" macro).

 

After 30 minutes, I'd get a pop-up stating "Don't forget to log in!"

 

I'm trying to duplicate that in ME Pro, but a new design in MEP has me stuck. The "When a specified time has elapsed..." option has two tabs: 1) Schedule - essentially where I define the frequency (30 minutes) and 2) Range - where I define lots of little specifics about when the macro runs.

 

I choose to run the macro indefinitely. I want it to run any time of day, so I leave the "Run between the hours of..." unchecked. I may need it any day of the week, so I leave all the days of the week checked.

 

But the line that defines "Start calculating the next runtime at: " defaults to the time and date that the macro was built. So, if I built my macro at 10:00 AM and logged out for lunch at 12:00 PM, the macro would run and remind me at 12:30... perfect!

 

However, if I didn't take my lunch until 12:15, the macro would run and remind me at 12:30, even though I still have 15 more minutes left.

 

What I need is for the scheduled macro to run after the specific time has elapsed from the time the macro becomes enabled. My first thought to work around this new MEP feature was to grab Date/Time variables and plug them in, but the "Start calculating" fields don't accept variables (understandable for an Activation).

 

Anybody have any ideas how I can make the zero-time match the time the macro is enabled?

 

If that's just not possible in MEP, can somebody help me figure out a way to build a macro that essentially does the same thing? Thanks!

 

PS - I've already considered using a macro that simply starts with a 30 minute delay command, and after 30 minutes gives me the pop-up. The problem with that option is that I may be running other macros in the mean-time, which isn't a problem in and of itself (thanks to the multiple macros functionality of MEP), but if I should need to abort any other macros, I will also inadvertently abort this macro, which I definitely do not want to do.

Link to comment
Share on other sites

In ME PRO you can have more than one macro running at a time. So can't you just activate a macro that will display a pop up window in 30 minutes? Then durring your lunch you can still run other macros as long as long as you don't disable other macros from running.

 

Just a thought.

:) Thanks, cmh, I edited my post while you were providing this response. And while you're right, about multiple macros, you're also right about the not disabling others... I need to be able to abort other macros while the Reminder remains viable.

Link to comment
Share on other sites

What I've done, as a work-around (a sad, pitiful work-around, at that) is this:

 

I run my usual macro (the one that should enable the scheduled macro. Rather than enabling any macros directly, however, I have implanted a Simulate Keystrokes Text Type command which causes a macro in ME3 to run.

 

That macro enables a scheduled macro within ME3. Once the set time has elapsed, I have that macro perform a Text Type command which runs a macro in MEP (because I really like the Text Box features in MEP). The MEP macro performs it's own Text Type command which activates an ME3 macro whose job it is to deactivate the scheduled macro (I'm considering incorporating the Enable/Disable functions into the same macro with an "If macro enabled" type script).

 

So, the ugly sequence looks like this:

 

MEP Macro A > Run ME3 Macro 1

ME3 Macro 1 > Enable ME3 Macro 2 (scheduled)

ME3 Macro 2 > Run MEP Macro B

MEP Macro B > Run ME3 Macro 3

ME3 Macro 3 > Disable ME3 Macro 2 (resets schedule to 0)

 

What it would look like if MEP's scheduled playback were like ME3's:

 

MEP Macro A > Enable MEP Macro B

MEP Macro B > Run self (including Disable MEP Macro B )

 

 

Life would be so much simpler.

 

Anybody come up with a better work-around than mine? Please somebody say yes! My Text Type commands in MEP are unreliable at best. I use this particular trick with scheduled macros for much more than just making sure I'm logged back in from lunch on time. That just happened to be the most universally useful occasion, one that many people could relate to.

 

I have other macros that run if a particular Citrix application hasn't been used in several minutes. If the scheduled time elapses without me using that Citrix app, then the macro runs, refreshing the Citrix app, keeping me logged in, so that later on - when other macros run which need to access the C. App - they can do so without getting hung up on the forced log-in page.

 

I also have to get through each individual piece of work within a given amount of time. If it takes longer than usual, I have to shuffle it off to somebody else for a more thorough look (I'm a lot like a sieve). I use this macro sequence to alert me when I'm getting close to my deadline to either submit or shuffle.

 

Anyway, thank you everybody who has at least looked at this thread and thought about figuring a work-around out for me. Submitting a feature request pressently.

Link to comment
Share on other sites

Anybody come up with a better work-around than mine? Please somebody say yes!

Why not have the macro that enables your reminder also set the schedule activation?

In other words, your enabling macro will also schedule the enabled macro just as if you were doing it yourself manually.

So it will tab from field to field, and set the exact time when you want the macro to run (I think you only set it to run once, because, if I've understood you, the reminder macro is then disabled until it's re-enabled by its boss macro - at which point you reset the once schedule).

 

Does that make sense?

Link to comment
Share on other sites

Why not have the macro that enables your reminder also set the schedule activation?

In other words, your enabling macro will also schedule the enabled macro just as if you were doing it yourself manually.

So it will tab from field to field, and set the exact time when you want the macro to run (I think you only set it to run once, because, if I've understood you, the reminder macro is then disabled until it's re-enabled by its boss macro - at which point you reset the once schedule).

 

Does that make sense?

 

Does to me. Sounds like the method I used a few weeks ago to regularly visit a web site. Its URL was chosen in a simple macro #1 called Setup regular display of URL and stored in a registry key (I was experimenting with that while this alternative to Saving/Restore variables was being discussed here). Then a more complex macro #2 called Scheduled check of URL (Registry) was run with scheduled activation (initially 30 mins I recall). It displayed a multiple-choice menu asking the user what to do, like

- go straight to the page

- wait 10 minutes

- wait 30 mins

etc

- stop the regular reminders altogether.

 

Depending on the choice it then ran a final macro #3 called Open scheduled macro in ME Pro Explorer then prepared for macro #2 to enter the appropriate fields.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Why not have the macro that enables your reminder also set the schedule activation?

In other words, your enabling macro will also schedule the enabled macro just as if you were doing it yourself manually.

So it will tab from field to field, and set the exact time when you want the macro to run (I think you only set it to run once, because, if I've understood you, the reminder macro is then disabled until it's re-enabled by its boss macro - at which point you reset the once schedule).

 

Does that make sense?

Hi Paul.

 

I may not have explained the issue clearly, so I apologize, and thank you for your suggestion. I actually enable/disable the scheduled macro very frequently (probably 3-5 times every minute on average), and this would get overwhelmingly tedious if it wasn't happening in the background.

 

The way I've got it set up right now, it is nearly instantaneous and only fails on a very rare occasion. It would be unbearable to have the macro re-establish the schedule timer every single time I need it to activate (once a day for the lunch reminder, but every 4-8 minutes on average for the Citrix refresh, and every 10 seconds to 5 minutes for my normal job function - I get through reviews usually within 10-30 seconds, though it can take as much as 5 minutes, at which point I need to start thinking about forwarding it on to the next person). At that point, I'd probably just consider getting an egg-timer (or use the timer function on my phone).

Link to comment
Share on other sites

Does to me. Sounds like the method I used a few weeks ago to regularly visit a web site. Its URL was chosen in a simple macro #1 called Setup regular display of URL and stored in a registry key (I was experimenting with that while this alternative to Saving/Restore variables was being discussed here). Then a more complex macro #2 called Scheduled check of URL (Registry) was run with scheduled activation (initially 30 mins I recall). It displayed a multiple-choice menu asking the user what to do, like

- go straight to the page

- wait 10 minutes

- wait 30 mins

etc

- stop the regular reminders altogether.

 

Depending on the choice it then ran a final macro #3 called Open scheduled macro in ME Pro Explorer then prepared for macro #2 to enter the appropriate fields.

 

--

Terry, East Grinstead, UK

Hey Terry,

 

Thank you for your input as well.

 

If I'm reading your post correctly, Macro #3 runs through the process Paul suggested and actually opens ME Explorer, Searches through your folders to find the correct macro, opens that macro in ME Editor, tabs to Activations, opens the Scheduled activation, manipulates the window to activate the Range tab of the scheduled macro then tabs to the "Start calculating the next runtime at:" and modifies the information to the current time and date.

 

Is that correct?

 

If so, it's way too cumbersome (even if it goes very fast); if not, I'd like to know more about the process. If it all happens in the background and more or less instantaneously.

 

Hopefully ISS isn't too bogged down by bugs these days to start looking into feature requests. This is an important one, in my opinion. Nobody should have to write a macro that has to edit an existing macro through the script editor.

 

I imagine there are situations where you know your macro needs to start running at a specific time, and needs to run every xx minutes from that specific time. But I also imagine that more often than not, or at least in a greater variety of situations, the timer needs to start when a specific action/function/event has occurred. Hense the reason why the ME3 way of running a scheduled macro was so much more useful.

Link to comment
Share on other sites

Ok, scratch this entire topic. I've been running test after test on this, and apparently the schedule is not based on the time the calculations start from (thank heavens). In fact, based on my tests, the schedule does appear to be running based on the time the macro is enabled... just like I want it to be.

 

So now I have to figure out why it isn't working 100%

 

Of course, it just made me a liar by running based on the last time it was run (not on the time it was enabled). Example: It ran at 10:32:01 (the test is set to run after 3 minutes); I disabled it for a couple of minutes, re-enabling it at 10:34. By rights, it should not have run again until 10:37, but it ran at 10:35:11... 3 minutes and 10 seconds after the last time it ran (the unexplained 10 seconds doesn't bother me nearly as much as the time it ran).

 

So now I have to figure out just exactly what it is basing its run-time on.

 

EDIT

Ok, another test shows the problem a little better, I think.

 

The test macro ran at 10:46:51. I disabled it immediately. By the 3 minutes calculation, the next run would be at 10:49:51, and then at 10:52:51.

 

I intentionally left the macro disabled until 10:51 (unknown seconds), at which point I re-enabled it - hoping that the macro would run at 10:54, but expecting it to run at 10:52:51 (based on previous observations noted above).

 

It ran at 10:51:41. Just afew seconds after I enabled it.

 

So it neither based its calculations on the previous run time (10:46:51), nor on the time it was enabled (10:51).

 

I'm officially at a loss to understand how this feature works in MEP.

Link to comment
Share on other sites

I know this issue is not interesting anymore to anybody besides me. And yet, here I go with another post.

 

Upon continued experimentation, I have determined the following:

  • Macro Express Pro bases the scheduled timer (for the elapsed time function) on the previous run-time.
  • If the macro has never been run, it runs based on the "start calculation" time.
  • If the macro is disabled, and then becomes enabled, the next run is based on the previous run time.
  • If the difference between the previous run time and the time that the macro becomes enabled is greater than the set elapsed time, the macro will run within several seconds.
  • If the difference between the last run time and the time the macro becomes enabled is less than the set elapsed time, the macro will finish the count-down and run when the elapsed time has... um... elapsed.

So the trick is going to be how to rig the macro to set the "last run" time to match the time at which the macro becomes enabled. And to do it invisibly, and successfully.

Link to comment
Share on other sites

Hey, it's always good to post these things in any case and I read every post here even if I do skim some.

 

I think your summary looks accurate and complete. I was thinking about this and I do not believe there is a way to do what you envision but that doesn't mean it can't be done. The essential problem is that you ant a variable start time and the scheduling doesn't support variables. So I think your solution is to simply have the first command of your nag macro to be a 30 delay. Since one can run multiple macros now it seems the most efficient solution even though I can think of others.

Link to comment
Share on other sites

Hey, it's always good to post these things in any case and I read every post here even if I do skim some.

 

I think your summary looks accurate and complete. I was thinking about this and I do not believe there is a way to do what you envision but that doesn't mean it can't be done. The essential problem is that you ant a variable start time and the scheduling doesn't support variables. So I think your solution is to simply have the first command of your nag macro to be a 30 delay. Since one can run multiple macros now it seems the most efficient solution even though I can think of others.

Hi Cory,

 

Thank you for your response.

 

A 30 minute delay would be fine, if I never needed to abort any of the other macros I may be running during my lunch - but I abort often (especially during lunch when I'm usually testing macros I'm building or tweaking).

 

A similarly delayed macro for the other instances when I'm interested in having a reminder pop-up, would be as effective, and suffer from the same shortfalls.

 

Ultimately, I'm hoping Insight takes my feature request to heart and adds an option to the elapsed time launcher, so that the elapsed time can be based on the time the macro becomes enabled (as it was in ME3).

 

Until then, I am relying on the complex running of ME3 macros by MEP to accomplish this feat.

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...
 Share

×
×
  • Create New...