Alexis Posted March 6, 2015 Report Share Posted March 6, 2015 I would like to have macros programspecific and within this program (FIREFOX.EXE) i would like to have also different windowspecific macros which only should work if program and window title matches. I could create a "If Window Title" line in every macro but i would like to have those macros seperate. So which macro is executed if one´s macros scope is set only to FIREFOX.EXE and another ones is set also to windowtitle contains "Google Tabellen" I did a bit of testing and the only way to make the new macro run was to disable the old (only programspecific) macro. How does MEX Pro determine which Macro to execute if more than one Macros scopes matches? Ist there a system? It would make sense if MEX prefer executing that macro where also the title fits and not only the program. Also a "Program Except Window Title" Scope Function would become handy. Thank You Alex Quote Link to comment Share on other sites More sharing options...
rberq Posted March 6, 2015 Report Share Posted March 6, 2015 Could you have a small controlling macro that runs for the FIREFOX program and makes all the decisions? The controlling macro would check window title, run one or more other macros in the appropriate sequence, then exit. The other macros would not need to be program or window specific, and would not need to check window title, because all that would be done by the small controlling macro. Quote Link to comment Share on other sites More sharing options...
Cory Posted March 6, 2015 Report Share Posted March 6, 2015 I don't think there's really a need for a "Except Window Tittle". Simply have the macro test the window title and abort the macro if it shouldn't run. That's what I do. Nothing in a computer happens at the same time. It might be microseconds but they're always different. In MEP if there are multiple conditions met near the same time then multiple macros will start at nearly the same time. Remember macros can run concurrently. I do what rberg suggests at times too. Create a master macro to command and control others. It's good advice. Quote Link to comment Share on other sites More sharing options...
Alexis Posted March 7, 2015 Author Report Share Posted March 7, 2015 I don't think there's really a need for a "Except Window Tittle". Simply have the macro test the window title and abort the macro if it shouldn't run. That's what I do. Well, that´s what does not work (in my case). The macro aborts but no other macro instead runs! BTW for testing for title the macro hast to run. Dear rberq you mean a macro which starts other macros? Thats an option but then i need extra macros which i don´t like. First of all let´s understand how MEX determine which macros are run if more than one matches the scope criterias. It may be that macros can run concurrently but they don´t do in my case. Maybe somebody can verify this: Macro A: Scope is Program Firefox.exe Macro B: Scope is Program Firefox.exe & Windowtitle "Google Tabellen" Macro C: Scope is Windowtitle "Google Tabellen" Macro D: Scope is Program Firefox.exe (Stops if Windowtitle is "Google Tabellen") My behaviour: 1. If program Firefox is focused and title is not "Google Tabellen" Macro A runs 2. If program Firefox is focused and title is "Google Tabellen" Macro A runs 3. If program Firefox is focused and Macro D aborts if title is "Google Tabellen" then Macro D runs and stops. Macro B does not run! 4. Macro C never runs as long a programscope matches. You may wonder what happens if 2 Macros are only programspecific and both check for the windowtitle. Nice try! Only one in my case the older one is running. The other one never starts and so never checks the title. Maybe Insight/Kevin knows more about how MEX decides which Macros to run. Maybe the date of creation is playing a role. Quote Link to comment Share on other sites More sharing options...
rberq Posted March 7, 2015 Report Share Posted March 7, 2015 Dear rberq you mean a macro which starts other macros? Thats an option but then i need extra macros which i don´t like. First of all let´s understand how MEX determine which macros are run if more than one matches the scope criterias. You may not LIKE having extra macros, but based on your testing that's what you will need in this case. Personally, I DO like having extra macros if that provides the level of control needed. Even if multiple macros would run based on program and window focus, could you be sure which one would run first? Just accept that you need an extra macro, and don't keep beating your head against the wall. Quote Link to comment Share on other sites More sharing options...
Cory Posted March 9, 2015 Report Share Posted March 9, 2015 Are you talking about scope or activation? Quote Link to comment Share on other sites More sharing options...
Alexis Posted March 10, 2015 Author Report Share Posted March 10, 2015 Scope! Activation is identical. Quote Link to comment Share on other sites More sharing options...
Cory Posted March 10, 2015 Report Share Posted March 10, 2015 How do you have the same activation? What is the activation? Quote Link to comment Share on other sites More sharing options...
Alexis Posted March 10, 2015 Author Report Share Posted March 10, 2015 Activation is the same keycommand in my case "Alt + Insert" Quote Link to comment Share on other sites More sharing options...
Cory Posted March 10, 2015 Report Share Posted March 10, 2015 I understand. When you selected that activation the second time there was a warning dialog box that popped up telling you that the activation would be scoped to a window/program. Also "Assigning more than one global macro to the same hotkey can cause unintended side-effects." So I'm afraid you're operating in an unsupported manner. IMHO it's a bad idea to have multiple macros using the same activation with overlapping scope. I would have to get into some experiments to test this and I don't have the time at the moment so I'll leave it to the others. Also I think it would be a better practice to have a single command macro instead. Quote Link to comment Share on other sites More sharing options...
Alexis Posted March 11, 2015 Author Report Share Posted March 11, 2015 I know. Thats why i suggested the scope feature "program except window" which would eliminate this flaw. I hoped that maybe MEX has an algorhythm how to handle multiple overlapping scope matchings. As you know you can assign program and windowtitles for scopes. It would be logical that MEX runs that macro which matches best/the most scope criterias (prgram and title) but it does not seem to work this way. My workaround is to use "if title..." commands at the beginning of prgram specific macros. I don´t like that because than i have one macros for 2 or more functions. Neither i´m keen of using additional control macros. BTW i noticed a bug in MEX Pro. Not all running processes are displayed in the window for assigning a program (scope). You can type the .exe in but it´s not listed! Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 11, 2015 Report Share Posted March 11, 2015 I would like to have macros programspecific and within this program (FIREFOX.EXE) i would like to have also different windowspecific macros which only should work if program and window title matches. I agree. I've often found myself needing the same flexibility. I've summarised it below and will also make a formal feature request. @Cory: Referring to Alexis's duplication of hotkeys, you said "So I'm afraid you're operating in an unsupported manner." I disagree. I do it all the time. Here's an extract from Help: The same hot key may be used multiple times if the scope is assigned to Window or Program Specific. -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Alexis Posted March 11, 2015 Author Report Share Posted March 11, 2015 Great Terry!! Finally i feel so understood! Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 11, 2015 Report Share Posted March 11, 2015 Hi Alexis, Going back to your original requirement. I may have missed something but I don't really see why you cannot do what I do. Namely, scope only to the window title? IOW, don't also add FIREFOX.EXE. That macro only ran when this unique window was active. --Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Alexis Posted March 11, 2015 Author Report Share Posted March 11, 2015 Yes you missed something. Please check Post #4 for this. It´s simply impossible to write an windowtitle specific scope for all possible Websites which entitles the Firefox application! ;-) And as i tested MEX unexpectedly prefers programscope about titlescope if both matches. Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 11, 2015 Report Share Posted March 11, 2015 After reading post #4 I'm still not clear about what it is you want to achieve. Assuming we are discussing only Firefox windows then I think we're agreed that if you set the scope for each macro to the unique window title (or a unique part of it) then that macro will only run when that FF window is active. Macro X will run if FF window title X is active, and so on. So far so good. What I'm having trouble grasping is why and when you want to run another macro that's scoped to run whenever any FF window is active? Perhaps if you could explain what function that 'general FF' macro is intended to achieve then I will better understand. Meanwhile, surely such 'general' functions could be implemented as a sub-macro of each of the 'title-based' macros? If FF window X is active, and you activate its macro, then FF is always the program on top. Your original post said "within this program (FIREFOX.EXE) i would like to have also different windowspecific macros which only should work if program and window title matches". But that 'and' condition seems to me to be always satisfied! Quote Link to comment Share on other sites More sharing options...
Cory Posted March 11, 2015 Report Share Posted March 11, 2015 I disagree Terry. Your quote from the help file I believe assumes the the scopes are not overlapping. IE that the way it mentions scope it's intention is that scope is used to eliminate a conflict (overlap). Hence the warning I cited. And whenever a developer makes a statement like "We don't know what will happen if you do this" then I believe it's unsupported and not the way it was intended to be used. Quote Link to comment Share on other sites More sharing options...
Cory Posted March 11, 2015 Report Share Posted March 11, 2015 Alexis if you found a bug you need to report it. If you have an idea for a feature you should request it. Both can be done on the ISS website. Quote Link to comment Share on other sites More sharing options...
Alexis Posted March 11, 2015 Author Report Share Posted March 11, 2015 Alexis if you found a bug you need to report it. If you have an idea for a feature you should request it. Both can be done on the ISS website. i like to have bugs or the need for features be confirmed by others first. Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 11, 2015 Report Share Posted March 11, 2015 I disagree Terry. Your quote from the help file I believe assumes the the scopes are not overlapping. IE that the way it mentions scope it's intention is that scope is used to eliminate a conflict (overlap). Hence the warning I cited. And whenever a developer makes a statement like "We don't know what will happen if you do this" then I believe it's unsupported and not the way it was intended to be used. That clear Help statement (under Index > Scopes) seem unambiguous to me! Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 12, 2015 Report Share Posted March 12, 2015 Alexis: Did you agree with my conclusion in post 16? 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.