Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Message box focus
#1
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
#2
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
Code:
Copy      Help
!+#32770^ /QM
and text
Code:
Copy      Help
act val(_command)
. 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:

Code:
Copy      Help
mes "" "" MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2


Forum Jump:


Users browsing this thread: 1 Guest(s)