What I am trying to do is send chat from AC to an outside program. The purpose of this is to create a plugin that launches an application that duplicates chat so the user can have many chat windows without using up AC window space.
The method I am trying to use is sendmessage. It has worked for me before in a different application, but for some reason not here.
This is what I have that works outside Decal:
Quote:
[DllImport("user32.dll"
]
public static extern IntPtr SendMessagebyString(IntPtr hWnd, Int32 Msg, IntPtr wParam, String lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr SendMessage(IntPtr hWnd1, Int32 Msg1, IntPtr wParam1, Int32 lParam1);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
[DllImport("user32.dll"
]public static extern IntPtr SendMessagebyString(IntPtr hWnd, Int32 Msg, IntPtr wParam, String lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr SendMessage(IntPtr hWnd1, Int32 Msg1, IntPtr wParam1, Int32 lParam1);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
Now I have determined that FindWindow/FindWindowEx both are providing the window I need. But SendMessage/SendMessagebyString are not “sendingâ€. (As a note, any variable passed to SendMessagenbyString’s lParam is null after the call. This is an artifact I have not experienced using this before)
However this whole scheme might be a wrong direction. I have tried to use older plugins that manipulate chat to uncover how they send chat out (like the IRC), but I have not been able to.
So does any plugin dev have any idea why SendMessage is not working, and if this is even a good tool to use in this application? Also, if a dev has used a tool to bring in chat from outside, how did you time it? Is there a way to trip the ChatEventsArg in Decal from outside? Or did you use a timer?
Any ideas would be appreciated.


