Jump to content
Macro Express Forums

Possible to activate a macro when program closes?


Eg6Xpm18cs

Recommended Posts

Problem is the macro must be running in order to detect the program being closed. I want to avoid this since I need to use other macros so there will be a conflict.

 

I'm wondering if there's a way, like some Windows functionality, to detect program closure without having anything special running in the background?

Link to comment
Share on other sites

Problem is the macro must be running in order to detect the program being closed. I want to avoid this since I need to use other macros so there will be a conflict.

 

I'm wondering if there's a way, like some Windows functionality, to detect program closure without having anything special running in the background?

 

Macro Express must be running, but no macro. The script that I outlined is activated by the closing of a specific window.

Link to comment
Share on other sites

Alan, is that a ME Pro feature? I can't find that activation option in ME3.

 

rks -- I can see one way to do what you want, but it is kind of clumsy: Schedule a macro to run every x seconds, and if the window is running set a switch to "on" (probably best to store it as an environment variable). Then next time it runs, x seconds later, if it finds the switch is ON but the window is no longer running, you know it closed in the interim.

 

Like I said, it's a little clumsy and not "instantaneous" like activating a macro when a window becomes on-top. But in the x-second intervals between scheduled runs, all kinds of other macros can run.

Link to comment
Share on other sites

...Schedule a macro to run every x seconds, and if the window is running...

 

...But in the x-second intervals between scheduled runs, all kinds of other macros can run.

 

Yes, that might do it for me in the absence of a direct solution. I forgot about timed repeating checks as a way to monitor a state w/o having background stuff continuously running. I don't need immediate activation so the interval could be an hour or so, and since the app isn't important I'm not concerned if it gets blocked by another macro running.

 

Thank you!

Link to comment
Share on other sites

Alan - Does Pro's memory consumption increase much when various states are being monitored?... or does monitoring increase likelihood of conflicts w/ other programs? ME3 typically consumes less than 10 Mb.

Free advice, and worth it: Check carefully the enhancements available with ME Pro, and if you don't REALLY need them then stick with ME3. The ME3 script editor is just much easier to navigate, and ME Pro has been very buggy. I have put together some fairly complex (IMHO) applications with ME3, running happily on about 350 PCs. I began several times to convert them to ME Pro as fixes to Pro were released, but each time I just ran into problem after problem after problem. Sorry to be a naysayer, my frustration is showing. ME3 has worked SO well that it was really a bummer to struggle with ME Pro. :(

Link to comment
Share on other sites

Alan - Does Pro's memory consumption increase much when various states are being monitored?... or does monitoring increase likelihood of conflicts w/ other programs? ME3 typically consumes less than 10 Mb.

 

I have never checked!

 

The ME3 script editor is just much easier to navigate, and ME Pro has been very buggy.

 

Early releases of ME Pro had "issues," but these are increasingly going by the wayside. I have not experienced any significant problems with the two most recent versions of MEP.

 

The user interface in MEP is more complicated than ME3, but there is an obvious solution: use MEP to streamline access to MEP! Since its release, I have accumulated almost 40 macros to simplify interaction with MEP, 30 of which I have used during the past month. In fact, when I teach classes about Macro Express, one of the exercises I assign is to script a macro to automate a task in Macro Express.

Link to comment
Share on other sites

For example, I have ten hotkey macros for the Script Editor to automate the accessing of the commands I use most often, including Mouse Move, Delay, Repeat, and Text Type.

 

In the "Text Type" window, I use about ten ShortKey macros to insert the keystrokes I use most often, including <ALT>, <CONTROL>, <ARROW RIGHT>, <ENTER>, and so on.

 

I also use ESC as a hotkey to close the Script Editor and return to Macro Explorer; to close the Direct Editor and return to Macro Explorer; and to close the "Text Type" window.

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