Alexis Posted October 5, 2009 Report Share Posted October 5, 2009 I want to add some functionality to certain progams. I want to create a Floating Menu for a specific Window. This Floating Menu should float on the window if this is active and should disappear (Place on bottom)if not. That sounds simple but is not. I tried windowactivating, -reordering commands but nothing works. Enabling, Disabling the Floating Menu is way to slow. Results are totally unpredictable. The Running Man as often in MEX Pro is unstoppable and often my whole systems freezes untill i kill the Macexp.exe in the taskmanager. I wonder if the window activating commands are reliably (Activation by gaining, loosing focus) Changing the windoworder of a floating menu shouldn´t be a problem, or? Thanks a lot Alexandra Quote Link to comment Share on other sites More sharing options...
Cory Posted October 5, 2009 Report Share Posted October 5, 2009 Awhile back I looked into the floating menus to be used in a similar fashion and what I took away was that they would not work. It's my belief that the floating menus are designed to open at startup and stay up as long as MEP is running. There may be some sleazy ways to do it (disable/enable) but I was unable to come up with anything that would work reliably. The only thing I can think of off the top of my head is to use the tool bars and buttons withing your program. EG if it were MS Word one can create buttons that run VB macros which can launch MEP macros. There were some posts awhile back about launching MEP macros via VBA for Excel I believe. You might want to check into that. Let us know if you do find a cool workaround. Quote Link to comment Share on other sites More sharing options...
Alexis Posted October 5, 2009 Author Report Share Posted October 5, 2009 Dear Cory, always the first to give some useful advice. Thanks a lot again! I think this issue is quite important as it allows to have some extra buttons/icons/functions right where and only if you need them (the relevant window is active). Most applicationwindows have some space left to add some extra buttons via a floating menu. As you might already have guessed i actually found a pretty cool workaround. While the macroactivation via "window is loosing focus" only caused trouble it works fine if you send the floating menus to bottom when you activate the following macro if another window is activated. The workaround is this: - Decide in which programs you want to add some extra buttons. For example 4 programs (A-D) - Create 4 Floating Menus (A-D) - Create 4 windowsactivated "Place other floating menus (FM) to bottom" macros. Here ist the script of one of which is activated by selecting a window of program A: Window Reposition "A FM" X, Y (where you want the FM to appear) Set Window Order "A FM"always on Top (make it appear) Set Window Order "B FM" Place on bottom Set Window Order "C FM" Place on bottom Set Window Order "D FM" Place on bottom The 3 other ones accordingly. This way only the needed FM (of the active window) is visible and disappear if one of the other windows gains focus. Works fine and fast. The disadvantage is that the FM are only placed on bottom (disapear) by one of the other three other windows and not by loosing focus itself which causes problems if you deal with many unknown windows. (The FM stay on top) Nevertheless, somehow it´s a kind of shame that tools, commands in MEX Pro does not work the way it´s expected. Maybe one of the insight-pros can add something here. Alexandra Quote Link to comment Share on other sites More sharing options...
Alexis Posted October 7, 2009 Author Report Share Posted October 7, 2009 By the way the command "Set window order on top" does not work reliably. It works however if you put "Place on topmost status and place on top" before. Alexandra 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.