Jump to content
Macro Express Forums

Still no reliable Macro Stop method


Recommended Posts

I was hoping the latest vesion of ME Pro would at last have implemented a fully reliable method of stopping macros. Sadly, not. I'm still occasionally getting runaway macros which cannot be stopped by any of the documented methods.

 

In the case that prompted this post it took me 20 secs or so before I somewhow managed to get into Task Manager and terminate ME Pro and hence stop a wild macro. Luckily, although it appeared to be creating havoc, no permanent damage was done, just a few random windows re-sized. But it might have been disastrous.

 

Can Insight please explain why a failsafe macro stop cannot be provided, such as the Scroll Lock + Pause keyboard shortcut defined in Help?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

There are two ways to halt a macro, by pressing a specific HotKey combination or by using the mouse to click on the Macro Express icon in the system tray. The HotKey is set to 'Scroll Lock + Pause' by default but can be changed in the preferences.

 

Often, when you want to stop a macro, it is because something is not running right on Windows. When you click the mouse or press a HotKey Windows receives a message that the action occurred and then has to pass that message to Macro Express. If these actions do not halt Macro Express it is generally because Windows never passed the message to Macro Express.

 

That is why there are two methods to halt a macro. Sometimes keystroke messages are not being processed by Windows. At other times mouse click messages are not being processed.

 

When your system is so messed up that you cannot even bring up Task Manager, you cannot expect Macro Express to be able to do any better. Applications have a much lower priority than Task Manager.

 

Your other report indicates that a problem occurred causing your computer to lock up. If you send a sample macro to our support people they can see if the problem can be duplicated on one of our computers. (It is possible that the underlying problem is caused by something specific to your computer.)

Link to comment
Share on other sites

If you send a sample macro to our support people they can see if the problem can be duplicated on one of our computers. (It is possible that the underlying problem is caused by something specific to your computer.)

 

Thanks Kevin. I did try to isolate the issue and also tried to write a short macro that would reproduce the problem, But this has so far proved impossible to accomplish in a controlled fashion, i.e that doesn't put my PC at serious risk. As I said in my email submission, this last issue was with a macro that was moving the mouse cursor and testing with the command If Not Mouse Cursor: Arrow. It seems that at such a time the <Scroll Lock + Pause> combination does not succeed in stopping the macro.

 

All other applications were and are running in their usual stable fashion. The ME Pro macro was the only chaotic event in an othwerwise normal day's work. Perhaps I'm mistaken but I get the impression you are trying to attribute blame elsewhere?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Perhaps I'm mistaken but I get the impression you are trying to attribute blame elsewhere?

No. You are talking about two separate things. When there are problems stopping a macro it is because Windows is not sending Macro Express Pro the HotKey or Mouse click message.

 

You have experienced another problem. I asked for a sample demonstrating it.

Link to comment
Share on other sites

Terry, I'm kind of thinking out loud here, so don't hold me accountable if I say something really dumb.

 

You want to deal with a panic situation, where there is a macro out of control. How about Ctrl-Alt-Shift-v to terminate ME? You kill off all running macros, but that is acceptable if you kill the offender along with all the others. Of course, as Kevin says, if Windows won't pass the keystrokes to ME, then that's no good.

 

Or if Windows lets you get to Task Manager, have a macro consisting of the single command "Terminate process: macexp.exe". Have that macro triggered by the Task Manager window title. Of course then you would have to enable the macro when you want the safety valve to be active, and disable the macro when you want to use Task Manager normally.

 

Ideally there would be a way OUTSIDE of ME to kill ME, other than through Task Manager, which takes too long. For example, a .cmd file that runs the Windows "kill" or "pskill" command. But how to make that .cmd file run when you want it to, especially if keyboard and mouse are locked out??? I don't know.

Link to comment
Share on other sites

Terry, I'm kind of thinking out loud here, so don't hold me accountable if I say something really dumb.

 

You want to deal with a panic situation, where there is a macro out of control. How about Ctrl-Alt-Shift-v to terminate ME? You kill off all running macros, but that is acceptable if you kill the offender along with all the others. Of course, as Kevin says, if Windows won't pass the keystrokes to ME, then that's no good.

 

Or if Windows lets you get to Task Manager, have a macro consisting of the single command "Terminate process: macexp.exe". Have that macro triggered by the Task Manager window title. Of course then you would have to enable the macro when you want the safety valve to be active, and disable the macro when you want to use Task Manager normally.

 

Ideally there would be a way OUTSIDE of ME to kill ME, other than through Task Manager, which takes too long. For example, a .cmd file that runs the Windows "kill" or "pskill" command. But how to make that .cmd file run when you want it to, especially if keyboard and mouse are locked out??? I don't know.

 

Thanks Bob, appreciate the help.

 

In this case it's hard for me to be 100% sure of exactly what I tried and didn't try, because I'll admit to being in panic mode. Testing a new macro, the mouse cursor ran riot (because of a mistake I'd made in the script at that stage). It wasn't just moving rapidly (harmless) but the left mouse button was down so it was also dragging various windows around faster than I could follow. But I did try Ctrl+Alt+Shift+v, as well as repeatedly using Scroll+Pause.

 

Kevin is suggesting a Windows XP cause, not MEP. Yet my keyboard and everything else was apparently working OK before the macro was run. And afterwards too - when I'd finally terminated and restarted MEP. So I find that explanation hard to understand.

 

There has to be some foolproof way to immediately stop a runaway macro, short of hitting the power button. Your ideas about a .cmd file seem promising to me. Maybe some of the other experts can advise how that might best be implemented. For use when all else fails, as in this case.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

No. You are talking about two separate things. When there are problems stopping a macro it is because Windows is not sending Macro Express Pro the HotKey or Mouse click message.

 

You have experienced another problem. I asked for a sample demonstrating it.

 

Do you mean a 'sample' of a macro that cannot be stopped? I already explained why I'm unable to provide that.

 

Did you try to create a runaway macro on your system using the If Not Mouse Cursor: Arrow command? Here is a stable macro similar to one I was trying to write. That was for use with Google Earth, but I've amended it to make it more accessible. Its purpose is to set the Categories pane of ME Pro Explorer to a specific width.

 

Window Activate: Macro Express Pro - Explorer
Wait for Window Title: Macro Express Pro - Explorer
Window Move and Size: Move "<Current Window>" to (0,0) and size to 1060 x 1160 // Set size & position of ME Pro Explorer.
Delay: 100 milliseconds
Mouse Move: 150, 250 Relative to Screen // Move mouse cursor to arbitrary position in the Categories pane.
Repeat Until %N[99]% Does not Equal "%N[99]%" // Repeat indefinitely (until other logic stops the cycling).
 Mouse Move: 1, 0 Relative to Last Position // Move right, 1 pixel.
 Delay: 1 milliseconds
 If Not Mouse Cursor: Arrow // This means cursor has reached RH border of My Places pane.
   Mouse Left Button Down
     Mouse Move: 330, 150 Relative to Screen // Set Categories pane to required width.
   Mouse Left Button Up
   Break
 End If
End Repeat

 

 

 

(As an aside, this would have been easier to accomplish in ME3, which supported If Mouse for many more types of cursor than ME Pro.)

 

Note again that the above is NOT a sample of a runaway macro. But it was while developing it that the issue occurred. Amongst other things, I hadn't included the Break. But removing that from the above still doesn't reproduce the problem.

 

--

Terry, East Grinstead, UK

SizeMEProCategories.mex

Link to comment
Share on other sites

Kevin is suggesting a Windows XP cause, not MEP.

Not quite. You could not stop the macro because Windows XP was too busy to service the HotKey or mouse click to stop the macro. What caused Windows to be too busy is the problem. That problem may have been caused by Macro Express Pro. It may have been caused by something else or some combination of events.

Link to comment
Share on other sites

Ideally there would be a way OUTSIDE of ME to kill ME
There is and it's a command called "TaskKill". You could create a batch file named KillMEP and set the contents to something like "taskkill MacExp.exe -F". Type "taskkill /?" at the command prompt to get a complete listing of parameters. Here I used F to force. Now if you create a shortcut to this batch file you can open the shortcut properties and select a Shortcut Key for quick panic access.

 

But I have my doubts it will work. I use abort keys all the time in tropuble shooting on many systems and never have a problem with MEP aborting at the next macro command. To be clear one has to realize that if one command it taking a long time the macro can not be aborted until the next command is executed. But like Kevin said if your OS is so confused that it's no longer processing these messages then this is likely to fail for the same reason.

 

I read a lot of posts here from you with weird problems like this that seem to suggest your system is unstable. Might be time for an FnR (Format and Reinstall) or a spyware hunt even. I know keystroke loggers can cause problems like this.

Link to comment
Share on other sites

There is and it's a command called "TaskKill". You could create a batch file named KillMEP and set the contents to something like "taskkill MacExp.exe -F". Type "taskkill /?" at the command prompt to get a complete listing of parameters. Here I used F to force. Now if you create a shortcut to this batch file you can open the shortcut properties and select a Shortcut Key for quick panic access.

 

 

Good idea Cory. Turns out the syntax is slightly different. Here's a batch file that kills all 3 processes:

 

TASKKILL /F /IM MacExp.exe /IM MacEdit.exe /IM MacScript.exe

 

It works fine by d-clicking its regular shorctut. However, I'm frustrated that I can't run it from a keyboard shortcut. Same with any batch file.

 

On this XP Pro (SP2) PC I cannot get any shortcut keys to work on the shortcuts made from any batch file.

 

For example, Test-01.bat contains this ultra-simple one that anyone can play with:

 

@echo off

pause

 

I assigned it the shortcut <Ctl+Alt+3> (and several alternatives) as shown here

 

BatchProblem.jpg

 

But it doesn't run when I use the keys.

 

It runs fine if I d-click either the original batch file or its shortcut.

 

No difference after a PC reboot.

 

I installed a little program called Shortcut Key Explorer v1 01 by RJL Software from http://www.rjlsoftware.com/software/utility/shortcutkeys/

which lists all the keyboard shortcuts in use. It found the couple I've successfully installed, such as a test with Calculator. But for the test

batch file above, even though it's shown as having ctl-alt-3 assigned in the Properties, the Shortcutkeys list doesn't include it.

 

Very frustrating!

 

So I've assigned the ME killer batch above to a macro run by my old faithful Stiletto. I'm hoping that XP can still get to that when my next ME Pro macro runs riot and cannot be stopped with either <scroll lock+pause> or <ctrl-alt-shift-v>.

 

Edit, an hour or two later:

 

I've been using a simple batch file for testing:

 

Test-01.bat

-----------

@echo off

pause

 

But it would not run from a keyboard shortcut. However, after a tip from a Windows XP group I moved the shortcut from C:\Batch to C:\Documents and Settings\All Users\Start Menu\Programs\Batch. It now does - EVENTUALLY.

 

It is taking some 20 seconds to run any shortcut with a keyboard shortcut! This applies to ALL the shortcuts I've tried, not just those to batch files.

 

For example, shortcuts to Notepad, Calculator, etc. Yet all run immediately if I d-click the shortcut instead of using the keyboard.

 

One other thing that's emerged from intensive testing is that if I try again some 10 minutes later, say with the Notepad shortcut activated by ctl-alt-5, the first attempt brings up the program immediately. All subsequent attempts take 20 secs or so, until after another long wait when I get just the single correct result again. Weird ...

 

Anyone here have idea what on earth can be happening in that 20 seconds or so?! Examining Process Explorer showed only 2-3% CPU usage on this quad core 2.66 GHz 4Gb PC.

 

Of course, that inconsistency hopefully means the keyboard shortcut for my ME killer could work, at least the first time.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Well, you're trying to kill MEP.

Why are you trying to kill MEP?

Because you've got a problem with one or more running macros, and you need to terminate them.

I find that when MEP is behaving so erratically, one of the things it tends to interfere badly with is the keyboard!

Keyboard responsiveness is often/usually/always (?) severely degraded.

So why are you surprised about the hotkey taking so long to respond?

 

It's a little similar to the infamous sequence "Keyboard error - press F1 to continue" that we used to see when booting up!!!

Link to comment
Share on other sites

Here, Here! Exactly what Paul said. Terry. I have used shortcut keys for shortcuts all my life and the only time they don't work is when this system is jacked up! Odds are your system is busy being a zombie for some spammer. How much more evidence do you need that your system is having problems and that MEP is a victim and a symptom, not the cause. It just really bugs me that when the axle breaks and the wagon stops you get out and whip the horse. Why do you always assume it's MEP's fault?

Link to comment
Share on other sites

Well, you're trying to kill MEP.

Why are you trying to kill MEP?

Because you've got a problem with one or more running macros, and you need to terminate them.

I find that when MEP is behaving so erratically, one of the things it tends to interfere badly with is the keyboard!

Keyboard responsiveness is often/usually/always (?) severely degraded.

So why are you surprised about the hotkey taking so long to respond?

 

Eh? As I said, this hotkey delay issue applies to all shortcuts, not just that to my MEP killer. But if you're simply reminding me that it's unlikely to work in practice, then I agree, for the reasons you've given. I regard it as just one more option, before I hit the Reset or Power-Off buttons.

 

BTW, I've since googled my way to several similar reports about this side-issue. But so far none with an explanation or fix.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Here, Here! Exactly what Paul said. Terry. I have used shortcut keys for shortcuts all my life and the only time they don't work is when this system is jacked up! Odds are your system is busy being a zombie for some spammer. How much more evidence do you need that your system is having problems and that MEP is a victim and a symptom, not the cause. It just really bugs me that when the axle breaks and the wagon stops you get out and whip the horse. Why do you always assume it's MEP's fault?

 

I'm not sure what you're agreeing with so loudly, Cory? If I understood him correctly, Paul is saying that an MEP runaway macro disrupts proper KB operation, which seems entirely reasonable to me. And therefore a KB-activated 'MEP killer macro' is likely to fail. (Which BTW rather contradicts your earlier reply to Bob's question, "Ideally there would be a way OUTSIDE of ME to kill ME", to which you replied unequivocally: "There is and it's a command called 'TaskKill'.) As you see from my reply to Paul about that, I think he misunderstood my problem.

 

The other point you make also seems unrelated to MEP. I'm happy to hear that you've never had any problems with shortcut keys for shortcuts. I'll continue to investigate why I am having the specific problem I've described now that I've tried using them for the first time. But I can confidently rule out "being a zombie for some spammer"! Or do you somehow know more about my PC and my security routines than I do?

 

Edit: A runaway MEP macro this morning gave me an opportunity to try my <Ctrl+Alt+k> shortcut to a Stiletto macro 'ME-Kill', which is supposed to run that 1-line batch file I described up-thread. It failed.

 

I think <Ctrl+Alt+Del> does actually work. But on this occasion it took about 30 seconds for XP Pro TM to appear and another few for me to end MacExp.exe. During which time I guess a HD could be reduced to a garbled mess :(

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I don't believe that's what Paul is saying at all. I believe Paul is thinking more like I'm thinking. And you are correct I can't possibly know what's actually going on in your system but I do know you post a whole host of problems none else is having and in the past have made the comment that you install a lot of utilities and it's been a long time since you have FnR'd your system. That combined with decades of fixing slow and unresponsive systems for people as an admin lead me to simply suspect you have something amiss in your system. I will bet you a fifth of scotch if you go out and do a fresh install of Windows, do all the updates, and do a fresh install of MEP and nothing else most of these responsiveness problems will disappear.

 

You are running 4.1.6, right?

Link to comment
Share on other sites

Eh? As I said, this hotkey delay issue applies to all shortcuts, not just that to my MEP killer.

I believe that is exactly what I said; keyboard responsiveness may be severely degraded when a macro goes awry. This degraded responsiveness will apply to anything you try to do, regardless of whether it's running another MEP macro, or anything else (including Ctrl-Alt-Del).

Link to comment
Share on other sites

I believe that is exactly what I said; keyboard responsiveness may be severely degraded when a macro goes awry. This degraded responsiveness will apply to anything you try to do, regardless of whether it's running another MEP macro, or anything else (including Ctrl-Alt-Del).

 

Yes, that's what I mean about your having misunderstood me! Not surprising mind you, as I did raise a complex side-issue. If you read below

Edit, an hour or two later:

you'll see I was decribing behaviour unrelated to runaway MEP macros. Whatever is causing this strange effect (a consistent roughly 20 second delay in launching a shortcut from a KB shortcut) it's not 'degraded responsiveness' due to MEP. Not only is there no MEP macro running, stable or otherwise, but it arises with MEP closed.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

One particularly odd thing is that during these MEP runaway macros, when I do eventually get Task Manager displayed, all of the 3 MEP processes (MacExp, MacEdit and MacScript) are shown as consuming zero CPU resources.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Yes, that's what I mean about your having misunderstood me! Not surprising mind you, as I did raise a complex side-issue. If you read below

Edit, an hour or two later:

you'll see I was decribing behaviour unrelated to runaway MEP macros. Whatever is causing this strange effect (a consistent roughly 20 second delay in launching a shortcut from a KB shortcut) it's not 'degraded responsiveness' due to MEP. Not only is there no MEP macro running, stable or otherwise, but it arises with MEP closed.

By "MEP closed", I assume you've terminated all of the MEP processes which Kevin documented a while back?

My shortcuts run instantly every time. I fear I can provide only my usual response to you - it runs along the lines of

"It's your machine...."!

 

I suggest the following:

- Stop MEP from running at bootup

- Reboot

- Try the keyboard shortcut

 

If it's still slow, then it's your machine! If it's consistently quick, then it's probably caused by MEP - maybe MEP does lasting damage, not resolved by closing MEP.

 

Assuming it's consistently fast at this stage, reenable MEP. When you experience the slowness problem with MEP, close all MEP processes, and try the shortcut again. This will probably produce the slow behaviour, thus suggesting that MEP does lasting damage.

 

BTW, I experienced my first slowdown for ages, caused by MEP. At the time I was doing some video conversion, and not doing anything in MEP (latest version). Suddenly the machine slowed down enormously. I eventually managed to terminate MEP, at which point the slow behaviour ceased.

Link to comment
Share on other sites

One particularly odd thing is that during these MEP runaway macros, when I do eventually get Task Manager displayed, all of the 3 MEP processes (MacExp, MacEdit and MacScript) are shown as consuming zero CPU resources.

The problem is certainly not caused by MEP hogging CPU, and never has been. The problem appears to be static, in that some system setting(s) are altered, or something is delaying keyboard messages by causing some sort of wait.

Link to comment
Share on other sites

BTW, I experienced my first slowdown for ages, caused by MEP. At the time I was doing some video conversion, and not doing anything in MEP (latest version). Suddenly the machine slowed down enormously. I eventually managed to terminate MEP, at which point the slow behavior ceased.
I experienced a slowdown too the other day but the exact circumstances and symptoms were slightly different and I can't be entirely sure that closing MEP, which immediately regained responsiveness, wasn't a coincidence.
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...