Jump to content
Macro Express Forums

Newbie: getting rid of message windows


heech

Recommended Posts

Hi there,

 

I'm having issues with my very first macros, and would appreciate some help.

 

I'm launching an application (it has a message title of "Command Center"). At certain points, it will pop up a window called "Message"... I want to automate an Alt-O in order to clear the message.

 

My first attempt was very easy, and worked reasonably well:

 

- Scope, program specific (to my application),

- Properties, activation based on Window Title ("Message"),

- And the script itself: Alt key down, o, alt key up.

 

But then I realized this only works with *modal* message windows. My application sometimes also pops up non-modal message windows which I also want to clear. (It will pop up 4 in parallel, which also seems to confuse things.) And I've noticed that the macros appears to still be executing whenever "Message" gets focused... but sometimes the Alt-O is sent to the main application window behind it, rather than the message window.

 

What am I doing wrong...? I'm a little confused in terms of how to decide when/where the macros is executing... I tried to change my macros to add a "Activate Window - Message", but that didn't seem to have much effect.

Link to comment
Share on other sites

Hi there,

 

I'm having issues with my very first macros, and would appreciate some help.

 

I'm launching an application (it has a message title of "Command Center"). At certain points, it will pop up a window called "Message"... I want to automate an Alt-O in order to clear the message.

 

My first attempt was very easy, and worked reasonably well:

 

- Scope, program specific (to my application),

- Properties, activation based on Window Title ("Message"),

- And the script itself: Alt key down, o, alt key up.

 

But then I realized this only works with *modal* message windows. My application sometimes also pops up non-modal message windows which I also want to clear. (It will pop up 4 in parallel, which also seems to confuse things.) And I've noticed that the macros appears to still be executing whenever "Message" gets focused... but sometimes the Alt-O is sent to the main application window behind it, rather than the message window.

 

What am I doing wrong...? I'm a little confused in terms of how to decide when/where the macros is executing... I tried to change my macros to add a "Activate Window - Message", but that didn't seem to have much effect.

 

 

I'm not sure what a "modal" message window is, but you should be able to build a macro that can handle them. You just need

to know what the message window's name is, then you build this script:

Window Close: "specific window title"

<WCLS:specific window title>

 

Just set the macro to activate based on the Window title, and that should make it so that any time the window that you don't

want is activated, this macro will run and close it.

 

If several of the same window are popping up at the same time you may need to modify it a little bit:

 

Repeat Until %T1% <> %T1%
 If Window Title "specific window title" is running
Window Close: "specific window title"
 Else
Break
 End If
Repeat End

<REP3:08:000002:000001:0001:1:01:T1><IFOTH:04:2:specific window title><WCLS:specific window title><ELSE><BREAK><ENDIF><ENDREP>

Link to comment
Share on other sites

To add to Steve's excellent advice about making a macro that is triggered by a window title:

 

1. The window title must be the exact title as it appears. I have seen instances where the title includes hidden characters, so it is not always possible to type in a title.

 

Unfortunately, Macro Express does not have a way to capture the window title when you create a macro. Here is a technique to capture the window title after you have created a macro: Make sure that the window whose title you wish to capture is open. Switch to Macro Express, and create a new macro using any activation method -- it doesn't matter. Go to the "Properties" Page, change the activation method to "Window Title," then click the adjacent "Browse" button to select the desired window.

 

2. My experience has been that the scope of macros that are activated by window title usually need to be set to "Global." This is counterintuitive, but I find it to be true most of the time.

 

Feature request to Macro Express developers: Include a "Browse" button in the "Add Macro" dialog when the user selects "Window Title" as the activation method.

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