AutoHotkey Community

It is currently May 26th, 2012, 9:09 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: July 3rd, 2009, 2:28 am 
Offline

Joined: July 1st, 2009, 9:13 pm
Posts: 16
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2009, 3:42 am 
Offline

Joined: December 23rd, 2006, 6:02 pm
Posts: 424
Location: Russia
OnMessage() wrote:
Specifies a function to call automatically when the script receives the specified message.

"The script receives" means that the message was sent to the script's own window, not to a window of some other application.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2009, 4:33 am 
Offline

Joined: July 1st, 2009, 9:13 pm
Posts: 16
Wow, that is so obvious now that I read that. Thank you, now all I need to do is figure out the next necessary but bone-headed thing to ask. ^_^

Thank you YMP!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2009, 4:41 am 
this might be helpfull:
http://www.autohotkey.com/forum/topic35659.html
http://www.autohotkey.com/forum/topic22478.html


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Exabot [Bot], krajan, patgenn123, Yahoo [Bot] and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group