|
#1
|
||||
|
||||
|
So was bored at work yesterday and someone said something that gave me an idea...basically wouldn't it be nice if our office communicators could talk by themselves?
They are help desk guys so I decided to help them out ![]() I used an AI bot from: http://www.alicebot.org/directory.html ...then integrated into an application and wrote some .net code that hijacks incoming MS Communicator Messages, takes the incoming instant message and parses it out to the AI bot, then returns it back to the message window and submits it. The AI bot is pretty smart, and people could pretty much go on talking with it for a while thinking you are just being a bit weird lol. I threw it together quick though so a couple things...it's really only meant for incoming chatter (while you are either away or doing something else) so if you start the conversation make sure it's "stopped", send the IM, then quickly close the IM window and click "start" on the program. When they reply a new IM window will pop the the application will take over. You can see all the chat history in the application's log...it's pretty humorous when you get folks talking to it lol. Anyways, if any of you want to mess around with it you can download it here: http://www.mediafire.com/?hvg2s476fzcj4u1 I think the only requirements are Windows XP (or higher), .Net 3.5, and of course Office Communicator 2007/2010. Here's a pic: ![]() All the marked out names are incoming IM's from my friend in IT, and all the (Me) responses are generated by the AI bot. Last edited by Renevent; 01-19-2011 at 07:03 PM. |
|
#2
|
||||
|
||||
|
Hmm, Turing test here we come.
Sneaky sneaky Ren.
__________________
Quote:
|
|
#3
|
||||
|
||||
|
Good luck, hope it works for you lol.
|
|
#4
|
||||
|
||||
|
no no, I was saying that's what you did.. lol I have no interest in coming up with something like that.. :P
__________________
Quote:
|
|
#5
|
|||
|
|||
|
that going to be funny, yes the alicebot isn't bad at all, and certainly improved some over the years
__________________
Legendary key x2 holder since 20/12/2010 (a little late, but I have a key now ) and debit cards now work, yippee !!!!Co-op Digital Deluxe Bundle I have upped my pledge to $200, to show my support to the devs and GD, I hope a few more people follow my lead and KS will be successful. I want this game so badly, and I want it to rock
|
|
#6
|
|||
|
|||
|
Very nice work!
I'm working on a similar C# project of automating Office Communicator responses. I'm almost there, but I'm having problems capturing received messages. There's no such event according to the MOC SDK documentation (OCSDK.chm). I'm wondering how you did it... (did you perhaps use the UccApi.dll api?). I would greatly appreciate your help, or if you are willing the sourcecode of your project. Kind regards, Mark Last edited by markg; 05-01-2011 at 10:23 AM. |
|
#7
|
||||
|
||||
|
Sorry I didn't get back to you sooner I missed your reply...anyways yeah it's a pain in the ass to capture the incoming messages. Not sure if there is a more elegant way to do it, but here is how I was able to:
First you need to add the communicator object at the class level and make sure you declare it with events: Code:
Protected WithEvents communicator As New CommunicatorAPI.Messenger() Code:
Private Sub communicator_OnIMWindowCreated(ByVal pIMWindow As CommunicatorAPI.IMessengerConversationWndAdvanced) Handles communicator.OnIMWindowCreated
objWindow = pIMWindow
End Sub
Code:
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim strInput As String
Try
If Not objWindow Is Nothing Then
If Not objWindow.History Is Nothing Then
strInput = ParseIMMessage(objWindow.History)
Dim strOutput As String = Chat(strInput)
System.Threading.Thread.Sleep(4000)
objWindow.SendText(strOutput)
objWindow.Close()
txtLog.Text = Now.ToString("h:mm tt") & " (Me) " & strOutput & vbCrLf & txtLog.Text
End If
End If
Catch ex As Exception
End Try
End Sub
Hope this helps ![]() http://www.mediafire.com/?vd1uy091n07if6d Last edited by Renevent; 06-03-2011 at 07:49 PM. |
|
#8
|
|||
|
|||
|
Quote:
|
|
#9
|
|||
|
|||
|
For you interest;
On Windows 2003 Server, the Office Communicator application using Microsoft.mshtml generates the following event (see event log); EventType clr20r3, P1 myapplication.exe, P2 1.0.0.0, P3 4e254c9d, P4 mscorlib, P5 2.0.0.0, P6 4d352e63, P7 13a2, P8 7, P9 system.io.filenotfoundexception, P10 NIL. That's because the server requires the (for some reason missing) Microsoft Primary Interoperability Assemblies 2005. Installing C:\Program Files\Common Files\Merge Modules\vs_piaredist.exe resolves the issue. |
|
#10
|
||||
|
||||
|
Cool, good to know. Did you get everything else working ok?
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT. The time now is 01:02 PM.













) and debit cards now work, yippee !!!!
Linear Mode
