How to continue running Macro without "Abort", &qu

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
travel88
Newbie
Posts: 15
Joined: Sun May 20, 2007 11:42 am

How to continue running Macro without "Abort", &qu

Post by travel88 » Wed May 30, 2007 9:42 am

Hi,
I would like always to ignore any errors and continue running Macro, if any error occurs midway. That is, I need "Ignore" to be always as default. How can I do that?
Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed May 30, 2007 10:20 am

Code the macro so that those warnings never appear in the first place.

E.g. you will get a warning like that if you issue a SetFocus but the window doesn't exist. Avoid this by doing:

Code: Select all

ifWindowOpen>window_title
  SetFocus>window_title
  .. bla bla
Endif
Code your own Else condition as required - e.g. it could loop back to beginning, start the app, email you a notice, exit the script, or whatever.

Equally to avoid warnings/errors when accessing files:

Code: Select all

IfFileExists>filename
  DeleteFile>filename
Endif
In short you can code your script to avoid error conditions and handle them as necessary.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

travel88
Newbie
Posts: 15
Joined: Sun May 20, 2007 11:42 am

Ignore Macro scheduler errors

Post by travel88 » Sun Sep 16, 2007 11:45 am

Hi,
I need to ignore macro scheduler errors by default. For example in my looped script sometimes , " Invalid Mouse move occurs", which I need to ignore by default. The same script had many times looped succesfully but at certain times this error occurs. hence what I should do to " Ignore" Macro scheduler program errors by default, as my script does not produce any errors even if ignored.
Thanks for your valuable reply

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Sun Sep 16, 2007 12:27 pm

I've started getting the macro scheduler error " Invalid Mouse move " once in a while when I try to shut down my computer. This started happening with the newest version of macro scheduler. I'm running Windows XP Pro. Might be a minor bug.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Sep 16, 2007 1:17 pm

The only time you will get this message is if the values passed to the MouseMove command are not numeric. The message is only ever produced by the MouseMove command when the values are not numbers.

So to avoid it simply make sure the values are numeric. Non numeric mouse moves are clearly non-sensical and would have no effect.

If you get this error on shut down then you must have a macro running at the time. Since the message is only ever produced by the MouseMove function then you must have a macro running when you shut down the computer, and the values must also be non-numeric.

There's a function here which checks whether a value is numeric or not:
http://www.mjtnet.com/forum/viewtopic.php?t=3552

Using that before passing the value to MouseMove would prevent ever getting an invalid mouse move message. But I'd also debug the code that is creating the values to determine why you're ending up with non numeric values in the first place.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Sun Sep 16, 2007 2:36 pm

Thank you, I wasn't exactly sure how to track the error down. I'll find the culprit now. :)

My mistake. It isn't an mousemove error I'm getting at shutdown. It's a
" invalid pointer operation " I get some times at shutdown. After searching google looks my best way to find the culprit is to uninstal my most recent software one at a time and do a few shutdowns to find which one has the problem. If it turns out to be MS, I'll try reinstalling it first. If I still get the error I'll let you know.
Last edited by thaumaturgy on Sun Sep 16, 2007 3:44 pm, edited 1 time in total.

travel88
Newbie
Posts: 15
Joined: Sun May 20, 2007 11:42 am

Post by travel88 » Sun Sep 16, 2007 3:36 pm

As I told earlier . in my case, the script has run the same thing many times successfully, but at times and at random " Invalid Mouse move occurs"

The Mousemove command is

MouseMoveRel>443,67


Please also note, that my orginal question was how to Ignore all Macro scheduler errors by default, without human intervention.
Thanks

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Mon Sep 17, 2007 11:31 pm

Found a simple work around. If I Exit MS before I shut my computer down I don't get the MS message " invalid pointer operation ". I can live with that. :)

thaumaturgy
Junior Coder
Posts: 24
Joined: Mon Nov 01, 2004 1:30 pm

Post by thaumaturgy » Fri Sep 21, 2007 3:15 am

Thank you very much Marcus. The last update fixed "Invalid Pointer Operation" error on windows shutdown.

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