Jump to content
Macro Express Forums

Floating Menu example


floyd
 Share

Recommended Posts

The attached library shows how to create a floating menu system. It uses notepad, calculator, and the desktop. Both notepad and calculator have companion toolbars (floating menus). When notepad gains focus, its companion toolbar enables, the calculator toolbar disables, then focus is set back to notepad. The same set of sequences takes place when calculator gains focus. When your desktop gains focus, both toolbars disable themselves, and remain that way until either notepad or calculator regain focus.

 

Macros:

  • Calc Toolbar - Contains the Button 10 through Button 13 macros. Is enabled when calculator gains focus.
  • Note Toolbar - Contains the Button 20 through Button 23 macros. Is enabled when notepad gains focus.
  • Calc Gains Focus - Macro fires automatically when calculator gains focus. It enables and disables relevant toolbars.
  • Note Gains Focus - Macro fires automatically when notepad gains focus. It enables and disables relevant toolbars.
  • Desktop Gains Focus - Macro fires automatically when your desktop gains focus. It disables all toolbars.
  • Disable All Menus - Macro called by the above three macros. It disables all toolbars.

To test, open the library in Macro Express Explorer, launch calculator and notepad. Click back and forth on them. Don't be too quick ... Windows has to do a lot of housekeeping between window activations. If you click on the desktop the toolbars disable.

FloatingMenusExample.mex

Link to comment
Share on other sites

Hi Floyd, hi Cory,

 

i still feel misunderstood :(

 

But i think it´s my fault. Maybe because im not an native Englisch-Speaker it´s not so easy to make things clear.

 

I tried every possible way to hide/show those toolbars (FM). Actually enabling/disabling was my first choice. I discarded it right away because it takes too long (2 sec), all displayed FM begins to flicker, and it is stealing focus. Of course Floyd, you can prevent this by Activating the Source-Window again.

 

You will not experience those problems with Floyds Example. But you will, if you have just one more temporarily toolbar and one which is constantly floating on your screen. Try it out.

 

And the activating Window Command after the Enabling-Command causes of course the wildly discusssed problem.

 

We can stick to the outlook example. But the problem occurs always if the source window has a different name than a window which is produced by the macro or even by hand.

 

With your example Floyd, if i go to outlook and type SHFT+CTRL+M to create an new message i don´t see it very long because the macro is activating the main screen (MS Outlook) right over it quite quick.

 

Maybe this is unsolvable. Lets be constructive. I´m building up a feature request list. For this problem it would be:

 

  • Macro activation possible also by process name. (not only by window title)
  • Possibilty to activate a process not a window title.
  • Possiblity to switch through the last tasks (like ALT+TAB)
  • Wait for Macro (Title) finished Command. (to prevent conflicts)
  • Ability to show/hide toolbars(FM) instantly without letting them gain focus at all.
  • Showing hints while hovering over inactive toolbars. (i know it´s windows fault! ;) )

 

What do you think.

 

Alexandra

Link to comment
Share on other sites

With your example Floyd, if i go to outlook and type SHFT+CTRL+M to create an new message i don´t see it very long because the macro is activating the main screen (MS Outlook) right over it quite quick.

Not sure what you mean. My example did not use Outlook. I do not have Outlook.

 

  • Macro activation possible also by process name. (not only by window title)
  • Possibilty to activate a process not a window title.
  • Possiblity to switch through the last tasks (like ALT+TAB)
  • Wait for Macro (Title) finished Command. (to prevent conflicts)
  • Ability to show/hide toolbars(FM) instantly without letting them gain focus at all.
  • Showing hints while hovering over inactive toolbars. (i know it´s windows fault! ;) )
  • Macro activation possible also by process name. - Already can be done using Window Control activation.
  • Possibilty to activate a process not a window title. - Already can be done using Window Control.
  • Possiblity to switch through the last tasks (like ALT+TAB) - Not sure what you mean.
  • Wait for Macro (Title) finished Command. (to prevent conflicts) - This is how Macro Express already works.
  • Ability to show/hide toolbars(FM) instantly without letting them gain focus at all. - Not sure if Windows will allow launching a window without setting focus to it.
  • Showing hints while hovering over inactive toolbars. (i know it´s windows fault! ;) ) - Not fault, but design. It makes sense that only the focused window reacts to the mouse, or else there would be pandemonium.

Link to comment
Share on other sites

Watch the language. Save it for other forums, not this one.

 

:( Sorry, i mean secret Microsoft stuff.

 

But Joe, an opinion to this discussion would have been nice too! You already read everything to find my tiny fourletterword at the end, haven´t you? ;)

 

Floyd and maybe others still believes a window-title and a process (can consist of multible windows with varous titles) is the same. I could use a little help here to convince him.

 

Alexandra

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...