BigAnt开发包教程
BigAnt 做为一个企业级的及时通讯系统,其重点和普通的 IM 系统不同,主要的目的不是为了聊天,而是如何更有效的提高企业的工作效率。为了达到这个目的,我们在设计Bigant 在时候,就做了大量的企业调查,最终在我们的系统中在Bigant 的每一个细节都体现着企业的专业性:方便的文件传输,文件夹传输,消息的密码保护,强大的会议功能,实用的消息打开回执….
但我们知道,对于企业中的复杂环境,光做到以前几点还是不够的,为了更好的提高企业的工作效率,Bigant还提供了大量的开发接口,可以和我们企业中的现有管理系统进行集成,让这些软件也可以通过Bigant 以达到实时性,从而提高工作效率。
相关例子例子
例1:发送一个普通的消息.
Dim Session, Msg, LoginInfo
Set Msg = CreateObject("AntCom.AntMsg")
Set Session = CreateObject("AntCom.AntSyncSession")
Set LoginInfo = CreateObject("AntCom.AntLoginInfo")
Msg.Subject = "Start" ' 消息的标题
Msg.Content = "hi, im admin" ' 消息的内容
Msg.AddReceiver "user”, "" ' 消息接收者,如果要发给多个人可以从次调用 AddReceiver
Msg.ContentType = "Text/Text" ' 消息内容的格式
LoginInfo.Server = "127.0.0.1" 'Bigant 的服务器地址
LoginInfo.ServerPort = 6080 'Bigant 的服务端口
LoginInfo.LoginName = "Admin" ' 消息发送者的 LoginName
LoginInfo.PassWord = "" ' 消息发送者的 Password
Session.Login LoginInfo '登录
Session.SendMsg Msg, 0 '发送消息
效果如下图:


例2:发送一个Html的消息
Dim Session, Msg,LoginInfo
Set Msg = CreateObject("AntCom.AntMsg")
Set Session = CreateObject("AntCom.AntSyncSession")
Set LoginInfo = CreateObject("AntCom.AntLoginInfo")
Msg.Subject = "Start" ' 消息的标题
Msg.ContentType = "Text/Html" ' 消息内容的格式
Msg.Content = "<HTML><h1>hello</h1></HTML>" ' 消息的内容
Msg.AddReceiver "user”, "" ' 消息接收者,如果要发给多个人可以从次调用 AddReceiver
LoginInfo.Server = "127.0.0.1" ' Bigant 的服务器地址
LoginInfo.ServerPort = 6080 'Bigant 的服务端口
LoginInfo.LoginName = "Admin" ' 消息发送者的 LoginName
LoginInfo.PassWord = "" ' 消息发送者的 Password
Session.Login LoginInfo '登录
Session.SendMsg Msg, 0 '发送消息
效果如下图:

例3:发送一个Web页面的消息.
Dim Session, Msg,LoginInfo
Set Msg = CreateObject("AntCom.AntMsg")
Set Session = CreateObject("AntCom.AntSyncSession")
Set LoginInfo = CreateObject("AntCom.AntLoginInfo")
Msg.Subject = "Start" ' 消息的标题
Msg.ContentType = "Text/URL" ' 消息内容的格式 in URL
Msg.Content = "www.google.com" ' 消息的内容, 对方在收到消息时,会直接显示 www.google.com 这个 Page
Msg.AddReceiver "user" , "" ' 消息接收者,如果要发给多个人可以从次调用 AddReceiver
LoginInfo.Server = "127.0.0.1" ' Bigant 的服务器地址
LoginInfo.ServerPort = 6080 'Bigant 的服务端口
LoginInfo.LoginName = "Admin" ' 消息发送者的 LoginName
LoginInfo.PassWord = "" ' 消息发送者的 Password
Session.Login LoginInfo '登录
Session.SendMsg Msg, 0 '发送消息
效果如下图:

例4:发送一个带附件的消息.
Dim Session, Msg,LoginInfo
Set Msg = CreateObject("AntCom.AntMsg")
Set Session = CreateObject("AntCom.AntSyncSession")
Set LoginInfo = CreateObject("AntCom.AntLoginInfo")
Msg.Subject = "Start" ' 消息的标题
Msg.ContentType = "Text/Text" ' 消息内容的格式
Msg.Content = "hi" ' 消息的内容
Msg.AddReceiver "user”, "" ' 消息接收者,如果要发给多个人可以从次调用 AddReceiver
Msg.AddAttach "c:\sn.txt", "" ' 加入一个附件
LoginInfo.Server = "127.0.0.1" ' Bigant 的服务器地址
LoginInfo.ServerPort = 6080 'Bigant 的服务端口
LoginInfo.LoginName = "Admin" ' 消息发送者的 LoginName
LoginInfo.PassWord = "" ' 消息发送者的 Password
Session.Login LoginInfo '登录
Session.SendMsg Msg, 0 '发送消息
效果如下图:

2. 开发Bigant 插件
因为开发 Bigant 插件有一定的专业要求,如果有这方面的需求,请和我们联系:info@bigant.cn

销售咨询电话 : 0571-88950406


