Jump to content
Macro Express Forums

Restricting macro to ONLY ONE window?


Recommended Posts

Okay, I see the following "feature" in the new MacroExpressPro:

 

"Restricting Playback

Use the macro scope properties to define when a macro can play back or not. Assign macros to play back in all Windows programs (Global), in only one specific window (Window Specific) or program (Program Specific), or in every program except the one you define (Global Except)."

 

I gather this feature is not available in "ordinary" MacExp??

 

Does this feature TRULY restrict the macro to one one window, say WordPad, and if I accidently move the mouse to another window(as I did yesterday - xmouse brings a window to the fore), the macro either stops or keeps running in the background WORDPAD window?? As I hint in parenthesis, I accidently strayed outside of wordpad yesterday and the macro kept spewing commands to everything and anything before I could terminate the darn thing. Fortunately, one of the only commands it did not execute is FORMAT C:!!!!! (G) If it really does restrict, I'm interested - this is not the first time I've managed to stray to another window or desktop and watch the ENTERTAINMENT BEGIN!!!

Link to comment
Share on other sites

ME3 has the same functionality.

 

The scope only restricts where it starts. Obviously we often hop between windows and apps in macros so we need this flexibility.

 

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.

Link to comment
Share on other sites

ME3 has the same functionality.

 

The scope only restricts where it starts. Obviously we often hop between windows and apps in macros so we need this flexibility.

 

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.

 

Thanks

 

Aha. But.... do I have to throw in these couplets before each series of typing or event so that when I'm part way through the macro and accidently switch windows, the macro will again be checking that I'm still in wordpad? Or is it enough to have that couplet at the beginning of the macor (I think not). That is

 

If NOT WINDOW, Activate window

Command A (type "quick brown fox")

If NOT WINDOW, Activate window

command b (cursor down 3 lines)

If NOT WINDOW, Activate window

command c (type "more text"

If NOT WINDOW, Activate window

command d (text prompt box)

etc

Link to comment
Share on other sites

Couplets? I like it. You must be a literary mind. I have some that will qualify as pentameter now that I think of it. I wonder if it's possible to do a macro haiku. I'll have to work on that.

 

My usage depends on a couple of things. First and foremost the potential for disaster. If I'm working in a live database table via a web portal then I tend to check thru a couple of means that I'm where I expect to be. But in other cases it's no big deal. Also as a general rule once you enter into an application and no major time elapses I don't think there's a need. But if it does something and allows the user to take time responding I always recheck. For instance I might ask for a client ID and the user stops, goes to another application to look it up and comes back. That will screw you up.

 

One other thing I've suspected but not substantiated is that sometimes it appears that dialog boxes in MEP are slow to put the focus back. EG I prompt for input and then type something only to find the window isn't focused. So in some critical cases after asking for such input I'll check the application window again. But then again I have a couple of machines that seem to randomly loose focus of every window for no reason. I believe it's related to having Remote Desktop sessions and macros on the other side open but I don't know for sure. Hmmm... That gets me thinking... Time to post.

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