Jump to content
Macro Express Forums

Automatically Close Floating Menu


Tim Osborn

Recommended Posts

On April 1, Leo asked the following Question, which apparently received no response:

 

I can get a floating menu to automatically launch when I open a program that I want those menu commands to be associated with. This is easily achieved using the Window Title activation method - great feature! Now, is there any way to get the floating toolbar to automatically close when the program it is associated with is minimized or closed?

 

I have the exact same question. For many years I have used a great macro/automation program called OncClick on the Classic Macintosh (OS9). In OneClilck, when you specify that the scope of a floating menu is specific to a particular program, OneClick automatically enables the menu when the program is launched, disables the the menu when the program loses focus, re-enables the menu when the program regains focus, and finally disables the menu when the program is closed.

 

Like Leo, I can get the floating menu enabled upon program launch, but the rest of it eludes me. Can the above described behavior be programmed with MacroExpress?

 

Thanks

 

Tim Osborn

Link to comment
Share on other sites

If you don't mind a slight delay, you could get by with a scheduled macro using the

If Window Running and If Program Not Running commands:

 

something like:

 

If Not Program Name "FIREFOX.EXE" running
 If Window Title "Some window that needs closing" is running
   Window Close: "Some window that needs closing"
 End If
End If

 

Then set the macro to run every 15 seconds or so.

 

Note that Macex is "single-tasking" though, so you can only run one macro at a time. That means when this macro is running, other macros cannot run, and vice versa.

Link to comment
Share on other sites

I think one way to do this, while very inelegant, is to write macros which disable the popup menus. If there are a limited number of programs which you will be using, you can write a macro for each program which is activated whenever the title of that program is on top. This macro will issue a macro disable command for each popup menu macro which is associated with other programs. It then issues a macro run command for the popup menu that is associated with the active window. I have only tried this with WordPad and NotePad.

 

As an example a Macro set to activate whenever wordpad is on top: "wpad menu activate" would be:

 

Macro Disable: npad menu (the name of the popup menu for notepad)

Delay 50 Milliseconds

Macro Run: wpad menu (this is name of the popup menu for wordpad)

 

 

One would need to create a keyboard macro which disables all of the popup menu macros so one could close the last popup menu when one went into a program for which one has not setup a macro like the one above. I haven't tried it, but one possible improvement would be to call the macro which disables all of the popup menu macros in the first step (where I have Macro Disable: npad menu in the example) before the Macro Run command to activate the desired popup menu. This would have the advantage that one has to edit only that one macro if new popup menu macros are created later.

Link to comment
Share on other sites

Thanks for the responses.

 

I think in order to do this right, MacroExpress needs another mode of activation......

 

"Any Window Title Except".

 

This would allow one to write a macro that would be activated when any program except the one the user specifies gains focus. That way, you could instruct MacroExpress to disable a floating menu when any program, other than the one it is meant for, has focus. This is a parallel concept to the "Global Except" scope category.

 

To the developers: What is the chance of adding an "Any Window Title Except" activation category in the near future?

 

Thanks

 

Tim Osborn (still in 30 day trial of MacroExpress)

Link to comment
Share on other sites

Thanks, but no. That set's the scope of a macro to all programs except the one you specify. It, however, doesn't actually activate or run the macro when any window other than the one you specify gains focus. I'm requesting a "global except" activation category.

 

Tim

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