Jump to content
Macro Express Forums

Runaway Macro - Scary Stuff!


paperguy

Recommended Posts

For some reason the combination of my WinXP Pro + Adobe Flash + MEX3 occasionally causes the macro to go South. All of a sudden its opening files all over my desktop and doing all kinds of scary things as I chase the "running man" trying to abort the macro and doing keypresses to the same end.

 

Is there a good method to set a trap for the macro (aborting it) if it leaves the "stage" of the applications specified that it should be dealing with?

Link to comment
Share on other sites

For some reason the combination of my WinXP Pro + Adobe Flash + MEX3 occasionally causes the macro to go South. All of a sudden its opening files all over my desktop and doing all kinds of scary things as I chase the "running man" trying to abort the macro and doing keypresses to the same end.

 

Is there a good method to set a trap for the macro (aborting it) if it leaves the "stage" of the applications specified that it should be dealing with?

 

Didn't the abort key specified in

Options > Preferences > Playback > Abort Macro HotKey:

stop it?

 

In ME Pro I use Scroll Lock + Pause but I've reported cases where worryingly it didn't halt the macro, and I had to use Terminate. But as far as I can remember that emergency stop always worked reliably in ME 3.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Didn't the abort key specified in

Options > Preferences > Playback > Abort Macro HotKey:

stop it?

 

Unfortunately not. Thats why I am forced to go running around trying to click on the little guy while all hell breaks loose on my Desktop. I happen to use the "Smart Move" option in XP, which while very convenient exacerbates this situation.

Although it happens infrequently it is very DISCONCERTING. Too bad that MEx3 doesn't have a application "bounds" checker that you could setup for a macro. Bounds would be set by the user and any deviation would give warning that MEx3 would then terminate the macro.

Link to comment
Share on other sites

I've had similar scary experiences, like the other day when a macro ran away and highlighted all the dozens of icons on my desktop and kept moving the mouse so I couldn't get to the running man and I was trying to remember whether that macro had a <DELETE> coded in it ....

 

I am wondering if I could set my programmable keyboard to do Start | Run | taskkill macexp.exe. Then I could label the key with a big red sticker like the panic button on machinery.

Link to comment
Share on other sites

I recently had a similar discussion in the new ProMacro forum. There is a ME option to check the WINDOW that is open with an IF condition. If you stray outside, the macro could be terminated. From where that discussion lead, you would need a series of tests to continually check if you were still within that window. I had the same thing happen - totally out of control macro and since ME generally does its thing, I could not even remember which key(s) to hit to end the chaos I was watching.

 

A brief quote from that thread:

 

"When I run macros where text typing or other interactive events occur I always toss in an "If Not Window on Top" > "Activate Window" command to avoid the problems you mention. Even if it isn't user interaction sometimes processes on the machine will silently steal focus so for any big time macros I always include this."

 

Again, a long macro sequence would require continual checks.

Link to comment
Share on other sites

I am wondering if I could set my programmable keyboard to do Start | Run | taskkill macexp.exe. Then I could label the key with a big red sticker like the panic button on machinery.

 

Most extraordinarily awesome! I tried this on one of the macros I run frequently and it seems to stop Mex3 dead in its tracks.

 

kill_me3.vbs

Const HIDDEN_WINDOW = 12

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")

Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacExp.exe /t /f", null, objConfig, intProcessID)

 

I programmed one of my keyboard keys to run the script. It FORCES a kill of MacExp.exe and any of its children. It also inadvertently closes the MacroEdit window, but thats easy enough to restart.

 

Thanks rberg for the idea!

Link to comment
Share on other sites

Most extraordinarily awesome! I tried this on one of the macros I run frequently and it seems to stop Mex3 dead in its tracks.

 

kill_me3.vbs

Const HIDDEN_WINDOW = 12

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")

Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacExp.exe /t /f", null, objConfig, intProcessID)

 

I programmed one of my keyboard keys to run the script. It FORCES a kill of MacExp.exe and any of its children. It also inadvertently closes the MacroEdit window, but thats easy enough to restart.

 

Thanks rberg for the idea!

 

As a non-programmer I'm not into VBS stuff or scripting in general. But I'd like to try an amended version of that in ME Pro if I can get a bit of advice here on how to amend it please. I see from XP Task Mgr that with ME Pro I have these three processes running:

MacExp.exe

MacEdit.exe

MacScript.exe

 

I did try the script as it stands (while running a simple looping macro), but it didn't work. To be more accurate, the macro closed after about 4 seconds, which I think was a natural finish.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

As a non-programmer I'm not into VBS stuff or scripting in general.

 

Neither am I, just reasonably good at Googling ;)

 

I did try the script as it stands (while running a simple looping macro), but it didn't work. To be more accurate, the macro closed after about 4 seconds, which I think was a natural finish.

 

I tried it on a loop also and it would kill the "running man" process - MacExp.exe but somehow MEx3 would restart it. When I tried it on a more "normal" macro that I run it worked fine.

 

Since the idea of this is for emergencies only, why not try something like this:

 

Const HIDDEN_WINDOW = 12

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")

Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacExp.exe /t /f", null, objConfig, intProcessID)
errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacEdit.exe /t /f", null, objConfig, intProcessID)
errReturn = objProcess.Create("cmd.exe /c taskkill /IM MacScript.exe /t /f", null, objConfig, intProcessID)

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