I'm missing something in getting OnMessage to call the specified function for any sort of window message. I've been trying to either respond to a tool tip message when Dragon has recognized a phrase or react to one of Dragon's custom messages. My script shows up in the system tray, the first message box pops up, but the function specified in OnMessage is never called.
Code:
DetectHiddenWindows, On
MsgBox, testing 123
; OnMessage (custom Dragon message...)
OnMessage(0x7EF, "MonitorDragonResults")
; I've also tried WM_SETTEXT / 0x0C with no luck
return
; macro syntax: macro macro_name params, ... max 1024 characters
MonitorDragonResults(wParam, lParam, msg, hwnd)
{
; this is never called
msgbox, Hi there.
; function would go on to detect tooltip title text and process voice macros
}
I'm new to AutoHotkey so I hope I'm missing something basic.
I'm working on a general purpose script for detecting Dragon NaturallySpeaking virtual keystrokes and pasted macros, or I would just use OnClipboardChange.
I've searched the forums, the documentation and searched the web with no luck so far. I will very much appreciate any advice you can offer.
Ivo in Seattle