Posts: 1,769
Threads: 410
Joined: Feb 2003
I have a macro that pops up a message box and waits for a y/n response, however, it doesn't always appear with focus. How can I make it appear with focus? Also, how can I make it highlight a different button?
thanks
Posts: 12,088
Threads: 142
Joined: Dec 2002
Standard message box obeys foreground window lock feature that doesn't allow non-foreground application to steal focus. You can disable it in QM Options/Runtime. Alternatively, create function with trigger
and text
. It will activate every QM message box and dialog box.
Third argument can be numeric, and it can be combination of MB_ flags that are defined in WinConstants function (if no, they are in winapiQM.txt file). For example, following code shows message with default button 2:
mes "" "" MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2