document updated 16 years ago, on May 8, 2008
AHK scripts can communicate amongst themselves.
Windows messages
- key points
- Be sure to use DetectHiddenWindows BOTH when finding AHK scripts' windows, AND when doing PostMessage
- more on finding PIDs:
- Our own: get via Process,Exist (interestingly enough, sending messages to ourselves is perhaps the easiest way to spawn new threads)
- All active AHK scripts: WinGet...list; Loop
- Passing strings between each other isn't totally trivial. There's a good discussion here, but the final result is here.
- If you can restrict yourself to SendMessage() (and avoid PostMessage()), then that's fine, because that means that the buffer you pass to it will remain open until it returns, because the other side is blocked.
DDE
Yeah, they're crazy. They claim to have
gotten it working though.