Jump to content
Macro Express Forums

Make A Macro Wait For A Popup Menu To Display


Recommended Posts

How can I make my macros wait for the pop up menu activated by right clicking any icon on the desktop.

I tried the "capture control" with out luck.


pop up menus take diferent times depending on what I Right click on, so I need to force

the macro to wait for the pop menu to be displayed, before proceeding.


java script:emoticon(':ph34r:')

Link to comment
Share on other sites

Welcome to the forum!


The answer to this is to wait for the next window to pop up rather than the "application" menu. Here is what I mean:

Delay 250 Milliseconds
Activate Window: "Program Manager"
Wait For Window Title: "Program Manager"
Text Type: VBS Edit
Text Type: <APP>
Text Type: r
Wait Window Lose Focus: "Program Manager"
Macro Return

<MSD:250><ACTIVATE2:Program Manager><WAITWIN2:000000:000002:Program Manager><TEXTTYPE:VBS Edit><TEXTTYPE:<APP>><TEXTTYPE:r><WAITWLF2:000000:000005:Program Manager><MRETURN>

The above example activates the Desktop and then sets focus to my VBScript icon. Then it uses the Application key rather than right-clicking the mouse button to activate the menu. Finally it activates the Properties window.


Essentially we are waiting for any other window to gain focus other than the Desktop. This is done because the application menu is not capturable and application menus take different times to appear. So we push all of the keystrokes into the keyboard buffer, and then wait.

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.

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.

  • Create New...