heech Posted December 12, 2008 Report Share Posted December 12, 2008 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. Quote Link to comment Share on other sites More sharing options...
heech Posted December 12, 2008 Author Report Share Posted December 12, 2008 I guess I can't figure out how the message windows are remaining on top, without actually gaining focus. If they weren't "on top", I guess I could just ignore that they existed at all. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted December 12, 2008 Report Share Posted December 12, 2008 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> Quote Link to comment Share on other sites More sharing options...
acantor Posted December 12, 2008 Report Share Posted December 12, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.