Which macro is running?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

Which macro is running?

Post by Dorian (MJT support) » Tue Jun 22, 2004 7:50 pm

I have noticed quite frequently that one of my macros seems to be starting on its own. This is signified by the Ms logo flashing in the systray.

I don't have logging enabled on any of my macros, so how can I tell which macro is running, without having to go through all my macros and individually turn on logging?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jun 22, 2004 10:14 pm

If you have the main Macro Scheduler Control Panel open, then the name of a running macro shows up at the bottom of the window in the Status Line.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Thu Jul 01, 2004 9:48 pm

Thanks Bob. I completely forgot I posted this! Many thanks for your help, as usual. :)

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Thu Jul 01, 2004 9:52 pm

Oh, um, me again. Mine just seems to say "press F1 for help" and "All macros"

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jul 02, 2004 12:32 am

1. Open Macro Scheduler.
2. Select the sample macro "Some Info"
3. Click on the Icon to Run the macro.
4. Observe center section of status line at the bottom of the Macro Scheduler Window, should see Running: Some Info

Macro must be running, not completed.
See logs for info on macros already completed running.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jul 02, 2004 12:55 am

Hi Horoscopes2000,

Are you sure that one of your macros seems to be starting on its own? Otherwise, it could be the one that hasn't yet completed. The default timeout of several commands such as WaitWindowOpen> is infinite.

Happy scripting.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Tue Jul 06, 2004 6:12 pm

Bob Hansen wrote:1. Open Macro Scheduler.
2. Select the sample macro "Some Info"
3. Click on the Icon to Run the macro.
4. Observe center section of status line at the bottom of the Macro Scheduler Window, should see Running: Some Info

Macro must be running, not completed.
See logs for info on macros already completed running.
hi bob,

How strange, that works just as you said. but still I see my macro icon flashing yet it isn't declaring itself on the status bar.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Tue Jul 06, 2004 6:14 pm

armsys wrote:Hi Horoscopes2000,

Are you sure that one of your macros seems to be starting on its own? Otherwise, it could be the one that hasn't yet completed. The default timeout of several commands such as WaitWindowOpen> is infinite.

Happy scripting.
I have a few which are set to start up when macro scheduler loads, then run every few minutes. for instance ones which check a web server is reachable. If they can't perform their job, they will wait 60 seconds and try again. If they cannot find a server after 20 loops they send me an email telling me a server has been down for 20 minutes. So when I see the flashing icon, I know it's probably one of these server checking macros, the question is finding out which one.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jul 06, 2004 7:03 pm

Horoscopes2000....just a remember that you put a restriction on us when you said:
without having to go through all my macros and individually turn on logging?
If you are sure which of the ones that could possibly be running, why not turn on the logging for those only? Turning on logging is pretty quick, logs generally take little disk space, can be set to delete previous log to stay small.

Or modify each of the macros themselves to update an INI file on start/stop or some other flag that you can check to see what is running. I suspect that it is easier to turn on logging vs. modifying the scripts.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1415
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Tue Jul 06, 2004 8:08 pm

You're right Bob, I'm going to have to turn on logging. I think I'll switch it on as a matter of course when I write a new macro. Thanks for all your help.

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Wed Jul 07, 2004 1:14 am

Hi Horoscopes2000,

Bob's troubleshooting guide is highly recommended and should be your first choice.

Alternatively, you may insert Msg> at the top of your scripts:
Msg>MyScript1.scp is currently running...

Again, it's a matter of personal work style.

BTW, when a script is calling multiple scripts (subroutines) embedded in multiple .scp files, in case of fatal error, Macro Scheduler won't offer any hint about which .scp file causes the error. In this scenario, again, logging is the most effective time-saving troubleshooting method.

Happy scripting.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts