Jump to content
Macro Express Forums

Adding buttons/functions to programs


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Dear Cory,

 

always the first to give some useful advice. Thanks a lot again! :rolleyes:

 

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:

 

  1. Window Reposition "A FM" X, Y (where you want the FM to appear)
  2. Set Window Order "A FM"always on Top (make it appear)
  3. Set Window Order "B FM" Place on bottom
  4. Set Window Order "C FM" Place on bottom
  5. 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

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